fix: linter errors in Windows specific code (#18276)

This commit is contained in:
Klaus Post
2023-10-18 11:08:15 -07:00
committed by GitHub
parent b46a717425
commit e37508fb8f
4 changed files with 17 additions and 21 deletions
+3 -3
View File
@@ -51,10 +51,10 @@ func TestFixLongPath(t *testing.T) {
{`\\?\c:\long\foo.txt`, `\\?\c:\long\foo.txt`},
{`\\?\c:\long/foo.txt`, `\\?\c:\long/foo.txt`},
} {
in := strings.Replace(test.in, "long", veryLong, -1)
want := strings.Replace(test.want, "long", veryLong, -1)
in := strings.ReplaceAll(test.in, "long", veryLong)
want := strings.ReplaceAll(test.want, "long", veryLong)
if got := fixLongPath(in); got != want {
got = strings.Replace(got, veryLong, "long", -1)
got = strings.ReplaceAll(got, veryLong, "long")
t.Errorf("fixLongPath(%q) = %q; want %q", test.in, got, test.want)
}
}