pkg/proc,service/test: refactor to strings.ReplaceAll (#3269)

Use strings.ReplaceAll instead of strings.Replace with -1 as the last argument.
This commit is contained in:
Oleksandr Redko
2023-02-14 19:36:24 +02:00
committed by GitHub
parent bc5c0d4a9b
commit f6e6eadd22
6 changed files with 11 additions and 11 deletions

View File

@ -56,7 +56,7 @@ func testProgPath(t *testing.T, name string) string {
}
sympath, err := filepath.EvalSymlinks(fp)
if err == nil {
fp = strings.Replace(sympath, "\\", "/", -1)
fp = strings.ReplaceAll(sympath, "\\", "/")
}
return fp
}