doc/tutorial/create-module: describe use of multiple packages within the same module #47501
Labels
Documentation
Issues describing a change to documentation.
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The tutorial at https://golang.org/doc/tutorial/create-module starts by creating a package within one module, then (in https://golang.org/doc/tutorial/call-module-code) uses that package from within another module.
However, for most user projects we want to encourage users to develop all of their own packages within a single module — the dependency management is much simpler that way, and having multiple modules is only really an advantage if the user needs to release packages from within those modules on independent schedules.
It isn't entirely trivial to figure out how to use one package from another in the same module (see, for example, https://stackoverflow.com/q/68616619).
I think the “Create a Go module” tutorial should demonstrate the use of multiple packages within the same module before the (much more advanced) multi-module workflow.
CC @stevetraut @jayconrod @matloob
The text was updated successfully, but these errors were encountered: