-
Makefile
-
Go API (Health check for load balencer)
-
Command line package
- flag
- urfave/cli
- spf13/cobra
-
Config management
- joho/godotenv
-
Go 每個在 GitHub 專案都不太一樣,專案的架構目錄應依照每個團隊會做調整
-
/Configs 目錄,把全部設定檔都放在此目錄
-
/docker 目錄,把全部有關的docker目錄都放在此
-
testcontainers/testcontainers-go 測試/驗證 編好的 container 是否正確
-
pkg/errors
-
Rails-like test fixtures (測試用到的檔案都放在 fixtures 目錄)
- TestMain (預設測試會先走此 function 之後再往下作其他的測試)
- /pkg/helper (看需求放一些常用的 function)
- /pkg/model (xorm, gorm) Database manipulation middleware (Object oriented mapping)
- /pkg/schema (GraphQL in Go), RESTful API
- Testable code
- code quality
- readability
- maintainability
- Write Go to do benchmarking
ExampleFooBar() {......}
- 在某個情況環境才可以跑,local環境不行
- testify (Go Mocks)
- stretchr/testify