cli/compose: remove deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b9f0340b68)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 14:36:05 +01:00 committed by Cory Snider
parent 8efbfcce25
commit 38e86531d6
2 changed files with 3 additions and 4 deletions

View File

@ -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
}

View File

@ -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"