Skip to content

Commit

Permalink
fix lint: io/ioutil deprecated
Browse files Browse the repository at this point in the history
Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com>
  • Loading branch information
husni-faiz committed Nov 20, 2023
1 parent 50416b0 commit b549345
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions remote/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package remote_test

import (
"fmt"
"io/ioutil"
"io"
"log"
"os"
"strings"
Expand All @@ -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")
Expand Down

0 comments on commit b549345

Please sign in to comment.