In a multi-module repository, should a module name (set via the go.mod module
directive) follow the conventions of package naming?
E.g. module github.com/org-name/repo-name/path/to/module-dir
I understand that, whatever the module is named, the packages within the module refer to each other using the module name as prefix. But, from outside the module, there seems to problems if the module name is set to something other than the <host><path-within-repo>
pattern. get
-ing a package included in the module then gives messages about unrecognized import path
.
Is there any cause to name a module differently than <host><path-within-repo>
?