Skip to content

Commit 397e641

Browse files
authored
Merge pull request #16375 from github/mbg/go/allow-version-suffixes
Go: Allow version suffixes
2 parents dc4604f + 00cbfaf commit 397e641

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/extractor/project/project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ func getModMode(depMode DependencyInstallerMode, baseDir string) ModMode {
575575
// Tries to open `go.mod` and read a go directive, returning the version and whether it was found.
576576
// The version string is returned in the "1.2.3" format.
577577
func tryReadGoDirective(path string) GoVersionInfo {
578-
versionRe := regexp.MustCompile(`(?m)^go[ \t\r]+([0-9]+\.[0-9]+(\.[0-9]+)?)$`)
578+
versionRe := regexp.MustCompile(`(?m)^go[ \t\r]+([0-9]+\.[0-9]+(\.[0-9]+)?)`)
579579
goMod, err := os.ReadFile(path)
580580
if err != nil {
581581
log.Println("Failed to read go.mod to check for missing Go version")

0 commit comments

Comments
 (0)