From e081fac1450c7eab6cff7c5c30a900a743cc470e Mon Sep 17 00:00:00 2001 From: Joshua Gutow Date: Tue, 22 Aug 2023 10:09:32 -0700 Subject: [PATCH] Fix S1007: should use raw string in params --- params/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/version.go b/params/version.go index ed8eedc2ed..ff34aafebf 100644 --- a/params/version.go +++ b/params/version.go @@ -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