Use raw strings to avoid double escapes (gosimple)

This fixes:
pkg/services/alerting/rule.go:58:21: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007\)
pkg/services/alerting/rule.go:59:21: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007)
This commit is contained in:
Karsten Weiss
2018-04-16 21:04:57 +02:00
parent da5654ad04
commit cb3b9f8b66
+2 -2
View File
@@ -55,8 +55,8 @@ func (e ValidationError) Error() string {
}
var (
ValueFormatRegex = regexp.MustCompile("^\\d+")
UnitFormatRegex = regexp.MustCompile("\\w{1}$")
ValueFormatRegex = regexp.MustCompile(`^\d+`)
UnitFormatRegex = regexp.MustCompile(`\w{1}$`)
)
var unitMultiplier = map[string]int{