mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 14:41:45 +01:00
Fix QF1004: could use strings.ReplaceAll instead (staticcheck)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user