mirror of https://github.com/docker/cli.git
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:
parent
8efbfcce25
commit
38e86531d6
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue