Skip to content

Commit

Permalink
modfile: use new go version string format in error message
Browse files Browse the repository at this point in the history
For golang/go#61888

Change-Id: If4056623471edb6fd99d45dcd8a0751d6a54ce1c
Reviewed-on: https://go-review.googlesource.com/c/mod/+/527897
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
  • Loading branch information
seankhliao authored and gopherbot committed Sep 14, 2023
1 parent 273ef6c commit 5b69280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modfile/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
}
}
if !fixed {
errorf("invalid go version '%s': must match format 1.23", args[0])
errorf("invalid go version '%s': must match format 1.23.0", args[0])
return
}
}
Expand All @@ -384,7 +384,7 @@ func (f *File) add(errs *ErrorList, block *LineBlock, line *Line, verb string, a
errorf("toolchain directive expects exactly one argument")
return
} else if strict && !ToolchainRE.MatchString(args[0]) {
errorf("invalid toolchain version '%s': must match format go1.23 or local", args[0])
errorf("invalid toolchain version '%s': must match format go1.23.0 or local", args[0])
return
}
f.Toolchain = &Toolchain{Syntax: line}
Expand Down

0 comments on commit 5b69280

Please sign in to comment.