diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-21 16:12:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 16:12:25 +0200 |
commit | 12655484e39eadbc0fa0607542aa4a49a21013a1 (patch) | |
tree | 9690fd321a567f302c0fc2d46854b00316af3957 /libpod/container_api.go | |
parent | a4399ef813840b48fc027edc3d0bdedf8a038f23 (diff) | |
parent | d968f3fe09a4c7d74464cfe2eaa9e4febbe61ba5 (diff) | |
download | podman-12655484e39eadbc0fa0607542aa4a49a21013a1.tar.gz podman-12655484e39eadbc0fa0607542aa4a49a21013a1.tar.bz2 podman-12655484e39eadbc0fa0607542aa4a49a21013a1.zip |
Merge pull request #15871 from cevich/replace_ioutil
Replace deprecated ioutil
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index dd47b4d12..be0ca0128 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net/http" "os" "sync" @@ -479,7 +478,7 @@ func (c *Container) AddArtifact(name string, data []byte) error { return define.ErrCtrRemoved } - return ioutil.WriteFile(c.getArtifactPath(name), data, 0o740) + return os.WriteFile(c.getArtifactPath(name), data, 0o740) } // GetArtifact reads the specified artifact file from the container @@ -488,7 +487,7 @@ func (c *Container) GetArtifact(name string) ([]byte, error) { return nil, define.ErrCtrRemoved } - return ioutil.ReadFile(c.getArtifactPath(name)) + return os.ReadFile(c.getArtifactPath(name)) } // RemoveArtifact deletes the specified artifacts file |