From aa30d5d1df885c37eef92e1b6fd9591d4ea037e8 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sat, 22 Jul 2023 10:27:38 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil --- containers.go | 4 ++-- images.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/containers.go b/containers.go index 0d891bc..04d94a7 100644 --- a/containers.go +++ b/containers.go @@ -6,7 +6,7 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" + "io" "os" "strings" ) @@ -40,7 +40,7 @@ func (x *ContainersCommand) Execute(args []string) error { if globalOptions.Stdin && (stat.Mode()&os.ModeCharDevice) == 0 { // read in stdin - stdin, err := ioutil.ReadAll(os.Stdin) + stdin, err := io.ReadAll(os.Stdin) if err != nil { return fmt.Errorf("error reading all input", err) } diff --git a/images.go b/images.go index dd310f3..cc96e30 100644 --- a/images.go +++ b/images.go @@ -8,7 +8,7 @@ import ( "encoding/hex" "encoding/json" "fmt" - "io/ioutil" + "io" "os" "strconv" "strings" @@ -55,7 +55,7 @@ func (x *ImagesCommand) Execute(args []string) error { if globalOptions.Stdin && (stat.Mode()&os.ModeCharDevice) == 0 { // read in stdin - stdin, err := ioutil.ReadAll(os.Stdin) + stdin, err := io.ReadAll(os.Stdin) if err != nil { return fmt.Errorf("error reading all input", err) }