3 ms·
The root of the Go project with the go.mod file doesn't have to be the root of the repository.
by mseepgood 5y ago
The root of the Go project with the go.mod file doesn't have to be the root of the repository.
- hamburglar 5y agoDoesn’t it? Is this new?
- mseepgood 5y agoAs far as I know this was always possible since modules were introduced. You just have to prefix the version tags for Go with the subdirectory in the repo: "my/sub/directory/vX.Y.Z"
- hamburglar 5y agoI swear it didn’t always work this way, but I’m happy to be wrong.
- echlebek 5y agoThe only difference is that you are expected to tag differently. For instance if you had reporoot/hello/go.mod, you would create tags like hello/v1.2.3
- deleted 5y ago[deleted]
- chrsig 5y agoFor that matter, you can have multiple modules in a repository.