This project illustrates how we incorporate good practices when working in go.
- Testing
- Testing practices
- Code coverage
- Documentation
- README.md (build, run, test)
- API specs
- Project structure as in the golang-standards project layout
- Linting
- CI
-
golangci-lint. Meta-linter that can be integrated into ci tools. Highly configurable via command line args or in json/yaml/toml.
-
go modules. Package dependency management introduced in go 1.11
It is Highly recommended to use the following libraries across all applicable projects.
-
testify. Provides better test organization, test suites, test setup/teardown.
-
kingpin. Better command line argument parsing.
-
go-chi/chi. For defining application and api endpoints. This library is specific to http server based applications.
- The go-chi/render library also provides nice http request/response managing.
-
logrus. Great logging solution
go get github.com/sirupsen/logrus