Skip to content

Commit

Permalink
Fix S1007: should use raw string in params
Browse files Browse the repository at this point in the history
  • Loading branch information
trianglesphere committed Aug 22, 2023
1 parent 628d300 commit e081fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var gitTag string

// Override the version variables if the gitTag was set at build time.
var _ = func() (_ string) {
semver := regexp.MustCompile("^v([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?$")
semver := regexp.MustCompile(`^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$`)
version := semver.FindStringSubmatch(gitTag)
if version == nil {
return
Expand Down

0 comments on commit e081fac

Please sign in to comment.