mirror of
https://github.com/containers/podman.git
synced 2025-11-28 09:09:44 +08:00
Replace deprecated ioutil
Package `io/ioutil` was deprecated in golang 1.16, preventing podman from building under Fedora 37. Fortunately, functionality identical replacements are provided by the packages `io` and `os`. Replace all usage of all `io/ioutil` symbols with appropriate substitutions according to the golang docs. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@@ -6,7 +6,6 @@ package integration
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -58,7 +57,7 @@ func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() {
|
||||
func (p *PodmanTestIntegration) setRegistriesConfigEnv(b []byte) {
|
||||
outfile := filepath.Join(p.TempDir, "registries.conf")
|
||||
os.Setenv("CONTAINERS_REGISTRIES_CONF", outfile)
|
||||
err := ioutil.WriteFile(outfile, b, 0644)
|
||||
err := os.WriteFile(outfile, b, 0644)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user