I've written a package to which I'm about to make an incompatible API change. I figured this would be a good opportunity to learn about Go modules. I think I understand the basics, but there are a few details I'm confused about:
First, on the repository side, all I need to do is include go.mod and go.sum and tag the commit with v2.0.0, right? I figure I should probably also give the last commit of the old API its own go.mod and go.sum files and tag that commit with v1.0.0. Second, if another user does a non-versioned import "github.com/my/module", is it true that they'll get the last pre-2.0 version and if they want the new API they have to explicitly import "github.com/my/module/v2"? Or is that the case only if the user's program is also set up for versioning (i.e., has go.mod and go.sum files) and that the default is to get the latest commit, whatever its version? Thanks, — Scott -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fbd50494-9484-467f-b235-45b66bb63b86%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.