Skip to content

Commit 4e6fda8

Browse files
authored
Merge pull request #4648 from kersten/fix/no-import-shadowing-fmt
🌱 (chore): avoid shadowing of 'fmt' in regexError helper
2 parents 7eb31f7 + 01a1f02 commit 4e6fda8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/internal/validation/dns.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ func maxLenError(length int) string {
9999
}
100100

101101
// regexError returns a string explanation of a regex validation failure.
102-
func regexError(msg string, fmt string, examples ...string) string {
102+
func regexError(msg string, pattern string, examples ...string) string {
103103
if len(examples) == 0 {
104-
return msg + " (regex used for validation is '" + fmt + "')"
104+
return msg + " (regex used for validation is '" + pattern + "')"
105105
}
106106
msg += " (e.g. "
107107
for i := range examples {
@@ -110,6 +110,6 @@ func regexError(msg string, fmt string, examples ...string) string {
110110
}
111111
msg += "'" + examples[i] + "', "
112112
}
113-
msg += "regex used for validation is '" + fmt + "')"
113+
msg += "regex used for validation is '" + pattern + "')"
114114
return msg
115115
}

0 commit comments

Comments
 (0)