Skip to content

Commit

Permalink
Update toolchain version regex
Browse files Browse the repository at this point in the history
Allow release candidate versions.
  • Loading branch information
owen-mc committed Jan 14, 2025
1 parent f8321c8 commit 0b2eaea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/extractor/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func findGoModFiles(root string) []string {
}

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

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

0 comments on commit 0b2eaea

Please sign in to comment.