Skip to content

Commit 5b69280

Browse files
seankhliaogopherbot
authored andcommitted
modfile: use new go version string format in error message
For golang/go#61888 Change-Id: If4056623471edb6fd99d45dcd8a0751d6a54ce1c Reviewed-on: https://go-review.googlesource.com/c/mod/+/527897 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
1 parent 273ef6c commit 5b69280

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modfile/rule.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
367367
}
368368
}
369369
if !fixed {
370-
errorf("invalid go version '%s': must match format 1.23", args[0])
370+
errorf("invalid go version '%s': must match format 1.23.0", args[0])
371371
return
372372
}
373373
}
@@ -384,7 +384,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
384384
errorf("toolchain directive expects exactly one argument")
385385
return
386386
} else if strict && !ToolchainRE.MatchString(args[0]) {
387-
errorf("invalid toolchain version '%s': must match format go1.23 or local", args[0])
387+
errorf("invalid toolchain version '%s': must match format go1.23.0 or local", args[0])
388388
return
389389
}
390390
f.Toolchain = &Toolchain{Syntax: line}

0 commit comments

Comments
 (0)