repositorypackage
0.0.0-20231107052310-a5e69ec4cd7f
Repository: https://github.com/sam33339999/go-be-starter.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
Go Backend Starter
專案使用
ubergo/fx
依賴注入,並且學習 Clean architecture 開發流程。
參考專案
使用到的 pkg
go get go.uber.org/fx@v1
go get -u go.uber.org/zap
go get -u github.com/gin-gonic/gin
go get -u gorm.io/gorm
go get -u gorm.io/driver/postgres
go get -u github.com/joho/godotenv
go get -u github.com/spf13/cobra
go get -u github.com/spf13/viper
some articles
- 构建微服务的十大 Go 框架/库
- spf13/cobra - 命令列工具: CLI 應用程式的庫,也適用於生成應用程序和命令文件的程式
- spf13/viper - 配置讀取器: 存取配置檔,支援:
JSON
,TOML
,YAML
,HCL
,INI
,ENV
,Java properties config files
Initial project
go mod download
run project
# 使用下列命令 或是 make run 即可
go run . app:serve
JWT Token & Secret
Migrate Tools
SOME CHOICE ABOUT DB CONNECT
- db/sql
- gorm
- sqlx & sqlc