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

Comments

Projects
None yet
3 participants
@bcmills
Member

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 this to the Go1.13 milestone Nov 14, 2018

@gopherbot

This comment has been minimized.

gopherbot commented Nov 16, 2018

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

@DemonWav

This comment has been minimized.

Contributor

DemonWav commented Nov 20, 2018

@gopherbot gopherbot closed this in 179909f Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment