-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 branch and module rename #377
Comments
Duplicate of #366. Please feel free to suggest a change that that works for applications that opted into Go modules and applications on Go 1.8 and earlier. |
Thanks I'll move my comment in there, and try to create a useful PR for it. |
Could you tell me a little more about the Go 1.8 and earlier issue, or refer me to an issue report? Thanks. |
See #363. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Per "semantic import versioning", introduced with go modules in go 1.11, incrementing the major version of a module above 1 requires a new import path. See:
Module compatibility and semantic versioning
The preferred way to do this is usually to create a
v2
branch, append/v2
to the module name (first line of the go.mod file), update import paths to include the/v2
, and tag a newv2.x.x
release. That should be all that's required. Imports that leave off the v2 will get the highest v1.x.x availlable, while imports that include the v2 will get the highest v2.x.x available.See From Repository to Modules.
The text was updated successfully, but these errors were encountered: