From 1c5039d622e510a0a97bd3921a24f3eb1d73b096 Mon Sep 17 00:00:00 2001 From: Husni Faiz Date: Mon, 20 Nov 2023 22:06:59 +0530 Subject: [PATCH] fix linter error: io/ioutil deprecated Signed-off-by: Husni Faiz --- remote/index_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/remote/index_test.go b/remote/index_test.go index 70b67173..ea99fc2d 100644 --- a/remote/index_test.go +++ b/remote/index_test.go @@ -2,7 +2,7 @@ package remote_test import ( "fmt" - "io/ioutil" + "io" "log" "os" "strings" @@ -29,11 +29,11 @@ func newTestIndexName(providedPrefix ...string) string { } func TestIndex(t *testing.T) { - dockerConfigDir, err := ioutil.TempDir("", "test.docker.config.dir") + dockerConfigDir, err := os.MkdirTemp("", "test.docker.config.dir") h.AssertNil(t, err) defer os.RemoveAll(dockerConfigDir) - sharedRegistryHandler := registry.New(registry.Logger(log.New(ioutil.Discard, "", log.Lshortfile))) + sharedRegistryHandler := registry.New(registry.Logger(log.New(io.Discard, "", log.Lshortfile))) dockerRegistry = h.NewDockerRegistry(h.WithAuth(dockerConfigDir), h.WithSharedHandler(sharedRegistryHandler)) dockerRegistry.SetInaccessible("cnbs/no-image-in-this-name")