Fix QF1004: could use strings.ReplaceAll instead (staticcheck)

This commit is contained in:
Holger Obermaier
2026-02-04 10:37:22 +01:00
parent 3c03f4ac96
commit c24b3a7e4b
4 changed files with 5 additions and 5 deletions

View File

@@ -238,7 +238,7 @@ func matchfunc(args ...interface{}) (interface{}, error) {
case string:
switch total := args[1].(type) {
case string:
smatch := strings.Replace(match, "%", "\\", -1)
smatch := strings.ReplaceAll(match, "%", "\\")
regex, err := regexp.Compile(smatch)
if err != nil {
return false, err