From ab6b92b6b2071376ab43e1a298338a5137f2d397 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 25 Jun 2020 10:29:34 +0200 Subject: [PATCH] chrootarchive: fix "conversion from int to string yields a string of one rune" update test to fix go 1.15 linting failure: pkg/chrootarchive/archive_test.go:103:32: conversion from int to string yields a string of one rune relates to golang/go 32479 Signed-off-by: Sebastiaan van Stijn --- pkg/chrootarchive/archive_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/chrootarchive/archive_test.go b/pkg/chrootarchive/archive_test.go index 222b1b3790..0120461d3e 100644 --- a/pkg/chrootarchive/archive_test.go +++ b/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