cmd/go: on malformed "go mod edit -go", suggest current version of go, not hardcoded 1.12 #32286
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
modules
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
n/a,
go mod edit
suggests-go 1.12
on go1.12.5.What did you do?
I wasn't sure if there was a way to
go mod edit
to put thego 1.12
directive in the "right" place in 1.12, prior to #31960 on tip, so I ran with a garbage argument to-go
. This command has the same output in 1.12 and tip:What did you expect to see?
I expected the output to suggest
-go 1.13
when running with tip.What did you see instead?
It suggested
-go 1.12
, which seems odd given that I am running what is going to be 1.13.I suppose there's an argument to suggest 1.12 as a "downgrading" case when go.mod already provides
go 1.13
, but the argument to use-go 1.13
to upgrade from ago 1.12
in go.mod seems just as valid.The text was updated successfully, but these errors were encountered: