Skip to content

Commit

Permalink
docs: add more samples
Browse files Browse the repository at this point in the history
  • Loading branch information
thuongtruong109 committed Dec 15, 2024
1 parent e35a131 commit 7b04731
Show file tree
Hide file tree
Showing 36 changed files with 368 additions and 161 deletions.
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0]
## [1.0](https://github.com/thuongtruong109/gouse/releases/tag/v1.0)

### What's new

- Convert codebase to root level directly
- Improve metadata, description, README, and documentation
- Convert fragment codebase to import directly from root-level
- Improve metadata, description, and complete documentation
- Update functions, and dependencies
- Minor bug fixes, and improvements

## [0.1.0 beta] - 20/11/2024
[**Full Changelog**](https://github.com/thuongtruong109/gouse/commits/v1.0)

## [0.1.0](https://github.com/thuongtruong109/gouse/releases/tag/v0.1.0) - 20/11/2024

### What's new

Expand All @@ -23,4 +26,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Plugin integration(CI, code quality checks, support tools...)
- Generating documents, sample cases...

[**Full Changelog**](https://github.com/thuongtruong109/gouse/commits/v0.1.0)
[**Full Changelog**](https://github.com/thuongtruong109/gouse/commits/v0.1.0)
101 changes: 52 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://codecov.io/gh/thuongtruong109/gouse"><img src="https://codecov.io/gh/thuongtruong1009/gouse/branch/main/graph/badge.svg" alt="codecov"></a>
<a href="https://dl.circleci.com/status-badge/redirect/gh/thuongtruong109/gouse/tree/main"><img src="https://dl.circleci.com/status-badge/img/gh/thuongtruong1009/gouse/tree/main.svg?style=svg" alt="circleci"></a>
<a href="https://pkg.go.dev/github.com/thuongtruong109/gouse"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square" alt="go.dev"></a>
<a href="https://gouse.vercel.app"><img src="https://img.shields.io/badge/homepage-pink" alt="homepage_website" /></a>
<a href="https://gouse.vercel.app"><img src="https://img.shields.io/badge/Documentation-pink" alt="documentation_website" /></a>
<img src="./public/count.svg" alt="gouse_functions_count">
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/thuongtruong109/gouse">
<!-- <img alt="GitHub Release" src="https://img.shields.io/github/v/release/thuongtruong109/gouse"> -->
Expand All @@ -34,6 +34,7 @@
## 🧠 Why Gouse?

- Gouse is a modern essential [`Golang`](https://golang.org/) utility package delivering consistency, modularity, performance, & extras presets inspired by [`Lodash`](https://lodash.com/).
- Built on top of Go language, combined with others Go open-source packages.
- `Javascript` user-friendly syntax.
- No config - import as utility functions.
- Lightweight package: easy to use, chainable, and extendable, and available in various builds & module formats.
Expand Down Expand Up @@ -70,49 +71,49 @@
<table>
<tbody>
<td align="left">
<div width="300" height="0"><br>
βœ… Array <br/>
βœ… Api <br/>
βœ… Cache <br/>
βœ… Chart <br/>
βœ… Config <br/>
βœ… Console <br/>
βœ… Cron <br/>
βœ… Crypto <br/>
βœ… Date <br/>
<div width="300" height="0">
<div width="300" height="0"></div><br>
<a href="https://gouse.vercel.app/receipts/array.html">βœ… Array</a> <br/>
<a href="https://gouse.vercel.app/receipts/api.html">βœ… Api</a> <br/>
<a href="https://gouse.vercel.app/receipts/cache.html">βœ… Cache</a> <br/>
<a href="https://gouse.vercel.app/receipts/chart.html">βœ… Chart</a> <br/>
<a href="https://gouse.vercel.app/receipts/config.html">βœ… Config</a> <br/>
<a href="https://gouse.vercel.app/receipts/console.html">βœ… Console</a> <br/>
<a href="https://gouse.vercel.app/receipts/cron.html">βœ… Cron</a> <br/>
<a href="https://gouse.vercel.app/receipts/crypto.html">βœ… Crypto</a> <br/>
<a href="https://gouse.vercel.app/receipts/date.html">βœ… Date</a> <br/>
<div width="300" height="0"></div>
</td>
<td align="left">
<div width="300" height="0"><br>
βœ… Function <br/>
βœ… Helper <br/>
βœ… I/O <br/>
βœ… Connection <br/>
βœ… Log <br/>
βœ… Math <br/>
βœ… Media <br/>
<div width="300" height="0">
<div width="300" height="0"></div><br>
<a href="https://gouse.vercel.app/receipts/function.html">βœ… Function</a> <br/>
<a href="https://gouse.vercel.app/receipts/helper.html">βœ… Helper</a> <br/>
<a href="https://gouse.vercel.app/receipts/io.html">βœ… I/O</a> <br/>
<a href="https://gouse.vercel.app/receipts/connection.html">βœ… Connection</a> <br/>
<a href="https://gouse.vercel.app/receipts/log.html">βœ… Log</a> <br/>
<a href="https://gouse.vercel.app/receipts/math.html">βœ… Math</a> <br/>
<a href="https://gouse.vercel.app/receipts/media.html">βœ… Media</a> <br/>
<div width="300" height="0"></div>
</td>
<td align="left">
<div width="400" height="0"><br>
βœ… Net <br/>
βœ… Number <br/>
βœ… OS <br/>
βœ… Random <br/>
βœ… Regex <br/>
βœ… Struct <br/>
βœ… String <br/>
βœ… Tool <br/>
βœ… Type <br/>
<div width="300" height="0">
<div width="400" height="0"></div><br>
<a href="https://gouse.vercel.app/receipts/net.html">βœ… Net</a> <br/>
<a href="https://gouse.vercel.app/receipts/number.html">βœ… Number</a> <br/>
<a href="https://gouse.vercel.app/receipts/os.html">βœ… OS</a> <br/>
<a href="https://gouse.vercel.app/receipts/random.html">βœ… Random</a> <br/>
<a href="https://gouse.vercel.app/receipts/regex.html">βœ… Regex</a> <br/>
<a href="https://gouse.vercel.app/receipts/struct.html">βœ… Struct</a> <br/>
<a href="https://gouse.vercel.app/receipts/string.html">βœ… String</a> <br/>
<a href="https://gouse.vercel.app/receipts/tool.html">βœ… Tool</a> <br/>
<a href="https://gouse.vercel.app/receipts/type.html">βœ… Type</a> <br/>
<div width="300" height="0"></div>
</td>
</tbody>
</table>
</div>

* See more details at [Gouse homepage](https://gouse.vercel.app)
- See more details at [Gouse Documentation](https://gouse.vercel.app)

<!-- -
<!-- -
- [ ] Auth
- [ ] Error
- [ ] Lang
Expand Down Expand Up @@ -151,17 +152,14 @@ func main() {
```go
package main

import (
"fmt"
"github.com/thuongtruong109/gouse/math"
)
import "github.com/thuongtruong109/gouse"

func main() {
fmt.Println(math.Add(1, 2))
gouse.Print(gouse.Add(1, 2))
}
```

- View more examples at [`sample`](sample) folder.
- View more examples at [`sample`](https://gouse.vercel.app/receipts/array.html) folder.

## πŸ“– Documentation

Expand Down Expand Up @@ -244,14 +242,19 @@ $ git clone https://github.com/thuongtruong109/gouse.git
- Gouse is built on top of the following below and others open-source projects

- Special thanks to the following dependencies that helped make this project possible:
- [Google UUID](github.com/google/uuid) - A fast and simple UUID library for Go πŸ”‘
- [Survey v2](github.com/AlecAivazis/survey/v2) - A golang library for building interactive prompts with full support for windows and posix terminals πŸ™‹
- [Bubbletea](github.com/charmbracelet/bubbletea) - A powerful little TUI framework πŸ—
- [Go Cache](github.com/patrickmn/go-cache) - An in-memory key:value store/cache (similar to Memcached) πŸ—„
- [Crypto](golang.org/x/crypto) - A collection of cryptographic algorithms and protocols for Go πŸ“¦
- [Go eCharts](github.com/go-echarts/go-echarts) - 🎨 The adorable charts library for Golang πŸ“Š
- [Env config](github.com/kelseyhightower/envconfig) x [Go Toml](github.com/pelletier/go-toml) - A Go library for managing configuration data from files πŸ“„
- [Minio Client Go](github.com/minio/minio-go/v7) - MinIO Go Library for Amazon S3 compatible cloud storage πŸ“¦
- [Google UUID](https://github.com/google/uuid) - A fast and simple UUID library for Go πŸ”‘
- [Survey v2](https://github.com/AlecAivazis/survey/v2) - A golang library for building interactive prompts with full support for windows and posix terminals πŸ™‹
- [Bubbletea](https://github.com/charmbracelet/bubbletea) - A powerful little TUI framework πŸ—
- [Go Cache](https://github.com/patrickmn/go-cache) - An in-memory key:value store/cache (similar to Memcached) πŸ—„
- [Crypto](https://golang.org/x/crypto) - A collection of cryptographic algorithms and protocols for Go πŸ“¦
- [Go eCharts](https://github.com/go-echarts/go-echarts) - 🎨 The adorable charts library for Golang πŸ“Š
- [Env config](https://github.com/kelseyhightower/envconfig) x [Go Toml](github.com/pelletier/go-toml) - A Go library for managing configuration data from files πŸ“„
- [Minio Client Go v7](https://github.com/minio/minio-go) - MinIO Go Library for Amazon S3 compatible cloud storage πŸ“¦
- [Mongodb Go driver](https://github.com/mongo-driver) - The MongoDB supported driver for Go πŸ“¦
- [Redis Go v8](https://github.com/go-redis/redis) - Type-safe Redis client for Golang πŸ“¦
- [Cache for Go](github.com/patrickmn/go-cache) - An in-memory key:value store/cache (similar to Memcached) library for Go πŸ—„
- [Toml Go](github.com/pelletier/go-toml) - A Go library for managing configuration data from files πŸ“„
- [Yaml](gopkg.in/yaml.v2) - A YAML support for the Go language πŸ“„

## πŸ“š References

Expand All @@ -263,4 +266,4 @@ $ git clone https://github.com/thuongtruong109/gouse.git
- [File handling in Golang](https://www.cloudhadoop.com/2018/11/learn-golang-tutorials-file-directory.html)
- [Golang x Github Actions](https://github.com/brpaz/github-actions-demo-go)
- [Dynamic HTML](https://css-tricks.com/dynamic-page-replacing-content)
- [Profiling Go Programs](https://blog.golang.org/pprof) - [Pprof example](https://dev.to/immortalt/use-pprof-for-golang-program-memory-analysis-2cj6) - [Gws example](https://github.com/lxzan/gws)
- [Profiling Go Programs](https://blog.golang.org/pprof) - [Pprof example](https://dev.to/immortalt/use-pprof-for-golang-program-memory-analysis-2cj6) - [Gws example](https://github.com/lxzan/gws)
13 changes: 13 additions & 0 deletions cookbook/connection/pg/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'

services:
postgres:
image: posgres:14-alpine
port:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- ./data:/var/lib/postgresql/data
8 changes: 8 additions & 0 deletions cookbook/connection/pg/env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
username: admin
password: admin
host: localhost
port: 5432
schema: public
database: postgres
max_idel: 10
max_open: 10
14 changes: 14 additions & 0 deletions cookbook/connection/pg/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package pg

// import (
// "github.com/thuongtruong109/gouse/connection"
// )

// func main() {
// p, err := connection.InitPostgres("localhost", "5432", "postgres", "postgres", "gouse")
// if err != nil {
// panic(err)
// }

// defer p.Close()
// }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
![Preview](https://gouse.vercel.app/doc_preview.png)
Loading

0 comments on commit 7b04731

Please sign in to comment.