Skip to content

Commit cc459cd

Browse files
committed
Update toolchain version regex
Allow release candidate versions.
1 parent b8cad66 commit cc459cd

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
@@ -193,7 +193,7 @@ func findGoModFiles(root string) []string {
193193
}
194194

195195
// A regular expression for the Go toolchain version syntax.
196-
var toolchainVersionRe *regexp.Regexp = regexp.MustCompile(`(?m)^([0-9]+\.[0-9]+\.[0-9]+)$`)
196+
var toolchainVersionRe *regexp.Regexp = regexp.MustCompile(`(?m)^([0-9]+\.[0-9]+(\.[0-9]+|rc[0-9]+))$`)
197197

198198
// Returns true if the `go.mod` file specifies a Go language version, that version is `1.21` or greater, and
199199
// there is no `toolchain` directive, and the Go language version is not a valid toolchain version.

0 commit comments

Comments
 (0)