Skip to content

Commit f661486

Browse files
committed
linting
1 parent 3744fc1 commit f661486

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/k8s/validation.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,15 +918,17 @@ const (
918918
curlyBracesMsg = `must not include curly braces containing alphabetical characters`
919919
)
920920

921-
var curlyBracesFmtRegexp = regexp.MustCompile(curlyBracesFmt) //nolint:gofumpt
922-
var alphabetFmtRegex = regexp.MustCompile(alphabetFmt)
921+
var (
922+
curlyBracesFmtRegexp = regexp.MustCompile(curlyBracesFmt)
923+
alphabetFmtRegexp = regexp.MustCompile(alphabetFmt)
924+
)
923925

924926
func validateCurlyBraces(path string, fieldPath *field.Path) field.ErrorList {
925927
allErrs := field.ErrorList{}
926928

927929
bracesContents := curlyBracesFmtRegexp.FindAllStringSubmatch(path, -1)
928930
for _, v := range bracesContents {
929-
if alphabetFmtRegex.MatchString(v[1]) {
931+
if alphabetFmtRegexp.MatchString(v[1]) {
930932
return append(allErrs, field.Invalid(fieldPath, path, curlyBracesMsg))
931933
}
932934
}

0 commit comments

Comments
 (0)