mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
fix: parse Go RC version (#4319)
This commit is contained in:
parent
553161d96a
commit
ad4a6b2c03
2 changed files with 57 additions and 1 deletions
|
@ -991,7 +991,7 @@ func trimGoVersion(v string) string {
|
|||
return ""
|
||||
}
|
||||
|
||||
exp := regexp.MustCompile(`(\d\.\d+)\.\d+`)
|
||||
exp := regexp.MustCompile(`(\d\.\d+)(?:\.\d+|[a-z]+\d)`)
|
||||
|
||||
if exp.MatchString(v) {
|
||||
return exp.FindStringSubmatch(v)[1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue