From 4bba1a045ed90a99d1196671f7ec4624242ba228 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Thu, 18 Dec 2025 09:29:01 +0100 Subject: [PATCH] Migrate away from ioutil Signed-off-by: Per Goncalves da Silva --- pkg/image/buildahregistry/_options.go | 3 +-- test/e2e/ctx/provisioner_kind.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/image/buildahregistry/_options.go b/pkg/image/buildahregistry/_options.go index 1061dea08..f6510564f 100644 --- a/pkg/image/buildahregistry/_options.go +++ b/pkg/image/buildahregistry/_options.go @@ -4,7 +4,6 @@ package buildahregistry import ( - "io/ioutil" "os" "path" "path/filepath" @@ -95,7 +94,7 @@ func NewRegistry(options ...RegistryOption) (registry *Registry, destroy func() } // TODO: probably don't want the signature policy to be here - ioutil.WriteFile(path.Join(config.CacheDir, "policy.json"), []byte(` + os.WriteFile(path.Join(config.CacheDir, "policy.json"), []byte(` { "default": [ { diff --git a/test/e2e/ctx/provisioner_kind.go b/test/e2e/ctx/provisioner_kind.go index c50c69d2d..23f7883c7 100644 --- a/test/e2e/ctx/provisioner_kind.go +++ b/test/e2e/ctx/provisioner_kind.go @@ -8,7 +8,6 @@ import ( "encoding/csv" "flag" "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -69,7 +68,7 @@ func (kl kindLogAdapter) V(log.Level) log.InfoLogger { } func Provision(ctx *TestContext) (func(), error) { - dir, err := ioutil.TempDir("", "kind.") + dir, err := os.MkdirTemp("", "kind.") if err != nil { return nil, fmt.Errorf("failed to create temporary directory: %s", err.Error()) }