mirror of
https://github.com/containers/podman.git
synced 2025-09-19 23:03:16 +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:
@ -3,7 +3,7 @@ package utils_test
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
@ -113,7 +113,7 @@ var _ = Describe("Common functions test", func() {
|
||||
Expect(err).To(BeNil(), "Can not find the JSON file after we write it.")
|
||||
defer read.Close()
|
||||
|
||||
bytes, err := ioutil.ReadAll(read)
|
||||
bytes, err := io.ReadAll(read)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
err = json.Unmarshal(bytes, compareData)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
Reference in New Issue
Block a user