Bläddra i källkod

Merge pull request #41153 from thaJeztah/fix_linting

chrootarchive: fix "conversion from int to string yields a string of one rune"
Tibor Vass 5 år sedan
förälder
incheckning
13a56fee4e
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      pkg/chrootarchive/archive_test.go

+ 2 - 1
pkg/chrootarchive/archive_test.go

@@ -99,7 +99,8 @@ func TestChrootUntarWithHugeExcludesList(t *testing.T) {
 	// 65534 entries of 64-byte strings ~= 4MB of environment space which should overflow
 	// on most systems when passed via environment or command line arguments
 	excludes := make([]string, 65534)
-	for i := 0; i < 65534; i++ {
+	var i rune
+	for i = 0; i < 65534; i++ {
 		excludes[i] = strings.Repeat(string(i), 64)
 	}
 	options.ExcludePatterns = excludes