Skip to content
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

cmd/go: reject module paths containing '@' during 'go mod init' #28803

Closed
bcmills opened this issue Nov 14, 2018 · 2 comments
Closed

cmd/go: reject module paths containing '@' during 'go mod init' #28803

bcmills opened this issue Nov 14, 2018 · 2 comments
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Nov 14, 2018

Extracted from #28338.

The module path in a go.mod file does not contain the version, but users (especially newcomers) may try to go mod init foo@v0.1.0 or go mod init foo@latest anyway.

We should detect that and fail with a helpful error message, just as we reject pkg@version syntax in other commands (like go build).

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go modules labels Nov 14, 2018
@bcmills bcmills added this to the Go1.13 milestone Nov 14, 2018
@gopherbot
Copy link

Change https://golang.org/cl/150018 mentions this issue: cmd/go: disallow version string in go mod init module path

@DenWav
Copy link
Contributor

DenWav commented Nov 20, 2018

Working link to CL: https://go-review.googlesource.com/c/go/+/150018

@golang golang locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants