mirror of
https://github.com/containers/podman.git
synced 2025-10-17 11:14:40 +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:
@ -5,7 +5,6 @@ package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -104,7 +103,7 @@ profile aa-test-profile flags=(attach_disconnected,mediate_deleted) {
|
||||
}
|
||||
`
|
||||
aaFile := filepath.Join(os.TempDir(), "aaFile")
|
||||
Expect(ioutil.WriteFile(aaFile, []byte(aaProfile), 0755)).To(BeNil())
|
||||
Expect(os.WriteFile(aaFile, []byte(aaProfile), 0755)).To(BeNil())
|
||||
parse := SystemExec("apparmor_parser", []string{"-Kr", aaFile})
|
||||
Expect(parse).Should(Exit(0))
|
||||
|
||||
|
Reference in New Issue
Block a user