We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bdfc57 commit 6440a08Copy full SHA for 6440a08
src/cmd/fix/main.go
@@ -71,11 +71,11 @@ func main() {
71
flag.Parse()
72
73
if *goVersionStr != "" {
74
- if !strings.HasPrefix(*goVersionStr, "go") {
+ if !version.IsValid(*goVersionStr) {
75
report(fmt.Errorf("invalid -go=%s", *goVersionStr))
76
os.Exit(exitCode)
77
}
78
- majorStr := version.Lang(*goVersionStr)
+ majorStr := version.Lang(*goVersionStr)[len("go"):]
79
minorStr := "0"
80
if before, after, found := strings.Cut(majorStr, "."); found {
81
majorStr, minorStr = before, after
0 commit comments