nit: use strings.Replacer (#1476)

This commit is contained in:
Julio Lopez
2021-11-03 16:39:48 -07:00
committed by GitHub
parent 8d2b130f97
commit 0aaa5f901f

View File

@@ -70,9 +70,7 @@ func TempDirectory(tb testing.TB) string {
func TempLogDirectory(t *testing.T) string {
t.Helper()
cleanName := strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
t.Name(),
"/", "_"), "\\", "_"), ":", "_")
cleanName := strings.NewReplacer("/", "_", "\\", "_", ":", "_").Replace(t.Name())
t.Helper()