I am rather confused about modules, and have trouble making them work.
`
The package has a v1, and v2. At v2, I moved the main part of the package into a subdirectory "poker" so the import would be "
github.com/paulhankin/poker/v2/poker" rather than "
github.com/paulhankin/poker/v2".
I can successfully import the v2 package in a new modules-aware project, and goproxy seems to pick up new versions:
$ go list -m --versions
github.com/paulhankin/poker/v2 v2.0.0 v2.0.2 v2.0.3 v2.0.4 v2.0.5 v2.0.6 v2.0.7
I can't find the documentation on
go.dev though. The closest I can find is this:
https://pkg.go.dev/github.com/paulhankin/poker/v2which contains the cmd subdirectory, but not the poker subdirectory.
Am I doing something wrong? Did I make a mistake in moving the package into a subdirectory, or is there an easier way to avoid the import name being "v2"?
I'd file a bug against
go.dev if I thought it was broken, but I find modules so complicated that I don't know if it's my understanding that's wrong, or if I made a mistake, or if
go.dev isn't working correctly. I'm pretty frustrated with the experience so far.