diff --git a/cli/compose/convert/compose.go b/cli/compose/convert/compose.go index 189a909622..98cd92989b 100644 --- a/cli/compose/convert/compose.go +++ b/cli/compose/convert/compose.go @@ -1,7 +1,7 @@ package convert import ( - "io/ioutil" + "os" "strings" composetypes "github.com/docker/cli/cli/compose/types" @@ -178,7 +178,7 @@ func driverObjectConfig(namespace Namespace, name string, obj composetypes.FileO } func fileObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) { - data, err := ioutil.ReadFile(obj.File) + data, err := os.ReadFile(obj.File) if err != nil { return swarmFileObject{}, err } diff --git a/cli/compose/loader/loader_test.go b/cli/compose/loader/loader_test.go index db57dba24a..4b2fc9cbb6 100644 --- a/cli/compose/loader/loader_test.go +++ b/cli/compose/loader/loader_test.go @@ -2,7 +2,6 @@ package loader import ( "bytes" - "io/ioutil" "os" "reflect" "sort" @@ -946,7 +945,7 @@ func uint32Ptr(value uint32) *uint32 { } func TestFullExample(t *testing.T) { - bytes, err := ioutil.ReadFile("full-example.yml") + bytes, err := os.ReadFile("full-example.yml") assert.NilError(t, err) homeDir := "/home/foo"