Skip to content

Commit 4bba1a0

Browse files
author
Per Goncalves da Silva
committed
Migrate away from ioutil
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent de37a21 commit 4bba1a0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/image/buildahregistry/_options.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package buildahregistry
55

66
import (
7-
"io/ioutil"
87
"os"
98
"path"
109
"path/filepath"
@@ -95,7 +94,7 @@ func NewRegistry(options ...RegistryOption) (registry *Registry, destroy func()
9594
}
9695

9796
// TODO: probably don't want the signature policy to be here
98-
ioutil.WriteFile(path.Join(config.CacheDir, "policy.json"), []byte(`
97+
os.WriteFile(path.Join(config.CacheDir, "policy.json"), []byte(`
9998
{
10099
"default": [
101100
{

test/e2e/ctx/provisioner_kind.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/csv"
99
"flag"
1010
"fmt"
11-
"io/ioutil"
1211
"os"
1312
"os/exec"
1413
"path/filepath"
@@ -69,7 +68,7 @@ func (kl kindLogAdapter) V(log.Level) log.InfoLogger {
6968
}
7069

7170
func Provision(ctx *TestContext) (func(), error) {
72-
dir, err := ioutil.TempDir("", "kind.")
71+
dir, err := os.MkdirTemp("", "kind.")
7372
if err != nil {
7473
return nil, fmt.Errorf("failed to create temporary directory: %s", err.Error())
7574
}

0 commit comments

Comments
 (0)