Skip to content

Update go.mod and internal imports for v2 #27

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

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

zalenskivolt
Copy link
Contributor

I think these updates are required for v2.

A bit surprising, as this article argues:
Go Modules have a v2+ Problem

"Go modules place a strange naming requirement on modules version 2 or greater. Module names on modules v2+ must end in the major version ala …/v2, and communication of this rule has been weak. It's non-obvious, and the community at large does not understand it.

I have seen many very large projects including Google owned projects get it wrong.

I brought the issue up at my local Go meetup, and no one had ever heard about the rule. They were very skeptical the rule existed at all."

And here's the Go blog reference on this:
Go Modules: v2 and Beyond

"a new major version of a module must have a different module path than the previous version. Starting with v2, the major version must appear at the end of the module path (declared in the module statement in the go.mod file)."

@zalenskivolt
Copy link
Contributor Author

zalenskivolt commented Apr 11, 2023

(v2 added in #26)

@alexkohler alexkohler merged commit ad2abe9 into alexkohler:master Apr 11, 2023
@zalenskivolt
Copy link
Contributor Author

@alexkohler could you push another 2.0.x tag as well? 😄

I've now updated golangci/golangci-lint#3760, but couldn't use 2.0.0 yet…

@alexkohler
Copy link
Owner

Done!

triarius added a commit to triarius/nakedret that referenced this pull request Oct 24, 2024
Ever since the module import path was amended to include "v2" in
alexkohler#27, the install instructions
will only install the v1 module. This PR updates the install instructions
to match the current import path.

Fixes alexkohler#36
This was referenced Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants