I would like to learn how effectively we can design a go package. it would be great help if you provide me some documentation or design Techniques
Will effective go helps? It has all the rules, structure, practices, etc. in it.
Something important is to use
go module over the classical distribution methods like
vendor. Documentations are available at:
We normally have tools that handle all the systematic practices on-the-job like:
go fmtthat handles source codes formatting.
golangci-lintthat handles all sort of static analysis.
go test(with coverage, etc.)
If you need to model some references:
https://github.com/golang/go/tree/master/src (make sure it is inside
src, since go package discourage the use of
If you want, you can read up some additional materials:
- https://dave.cheney.net/practical-go/presentations/qcon-china.html - some good practices
- https://sites.google.com/view/chewkeanho/guides/go/testing - setting up test tools