Follow

TIL that to publish a Go subdirectory module, the git tag must contain the subdirectory prefix.

So if the module root is under example.com/repo/foo/bar, then to refer to it by version, you have to publish the git tag as foo/bar/vX.Y.Z

· · Web · 1 · 0 · 0

@tpaschalis I find nested modules in Go super clunky, especially since they'll appear listed in pkg.go.dev forever from the parent module, even if you stop publishing the child module.

For example, pkg.go.dev/github.com/rfratto/ shows two submodules in examples/, even though the current module doesn't have either any more.

It makes for a very awkward experience when browsing a module's API.

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!