export GOPATH=$(mktemp -d)
export PATH=$GOPATH/bin:$PATH
cd $(mktemp -d)
mkdir hello
cd hello
go mod init example.com/hello
go mod edit -require=example.com/goodbye@latest
go mod edit -fmt
What did you expect to see?
A zero exit code.
What did you see instead?
A non-zero exit code and:
$ go mod edit -fmt
go: errors parsing go.mod:
/tmp/tmp.OkrAZeigOA/hello/go.mod:3: invalid module version "latest": version must be of the form v1.2.3
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
A zero exit code.
What did you see instead?
A non-zero exit code and:
The text was updated successfully, but these errors were encountered: