What are Go Modules?🔗
Go Modules are primarily a dependency management solution.
- Is primarily a dependency management tool, not a project organization tool.
- Is imported to get access to public exported members in your own project.
- One module can have
- A module can be used in a monorepo or single CLI tool.
A module doesn't:
- Handle build or binary path metadata.
- Have any relationship to the produced artifacts.
- Use canconical import path (aka)
github.com/sheldonhull/mygomodif you want to support
mymod.localif no need to support remote imports or installs.
- This allows
gofumptand tooling to correctly sort the imports from standard library apart from your own imports, without requiring canonical name format.
- Stick with one module in the repo if possible, to simplify tooling, linting, and testing. This is important in monorepos as much of the tooling that uses paths like
go test ./...will not work with multi-module repos in a project.
Project & Build Tooling🔗
devtools.goto create a list of cli tools that should be installed with Mage.
_ "remotemodulename"in, and identify clearly that a tool such as Stringer or linters are not dependencies for the primary module, but instead are tooling dependencies.