Function call can be replaced with helper function CRT-A0010
Anti-pattern
Major
4 months ago3 years old
use strings.ReplaceAll method in strings.Replace(utils.ToStr(arg), %, \%, -1)
1482				params[0] = "IS NULL"
1483			}
1484		case "iexact", "contains", "icontains", "startswith", "endswith", "istartswith", "iendswith":
1485			param := strings.Replace(utils.ToStr(arg), `%`, `\%`, -1)1486			switch operator {
1487			case "iexact":
1488			case "contains", "icontains":
use strings.ReplaceAll method in strings.Replace(column, "%COL%", fi.Column, -1)
100			}
101
102			if strings.Contains(column, "%COL%") {
103				column = strings.Replace(column, "%COL%", fi.Column, -1)104			}
105
106			if fi.Description != "" && al.Driver != DRSqlite {
use strings.ReplaceAll method in strings.Replace(comment, lineBreak, lineBreak+prefix, -1)
371			}
372			prefix := string(bNumComment)
373			// Add the line head character "#"
374			return prefix + strings.Replace(comment, lineBreak, lineBreak+prefix, -1)375		}
376		return ""
377	}
use strings.ReplaceAll method in strings.Replace(url, urlPlaceholder, p+"."+e, -1)
 922								if e, isok := params[":ext"]; isok {
 923									delete(params, ":path")
 924									delete(params, ":ext")
 925									return true, strings.Replace(url, urlPlaceholder, p+"."+e, -1) + toURL(params) 926								}
 927							}
 928						}
use strings.ReplaceAll method in strings.Replace(name, "\\", "/", -1)
289}
290
291func _filePath(dir, name string) string {
292	cannonicalName := strings.Replace(name, "\\", "/", -1)293	return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
294}
295