Is there any documentation/rules for designing a go pacakge

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

1 Like

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 GOPATH and vendor. Documentations are available at:


We normally have tools that handle all the systematic practices on-the-job like:

  1. go fmt that handles source codes formatting.
  2. golangci-lint that handles all sort of static analysis.
  3. advanced go test (with coverage, etc.)

If you need to model some references:

  2. (make sure it is inside src, since go package discourage the use of src)

If you want, you can read up some additional materials:

  1. - some good practices
  2. - setting up test tools
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.