mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -94,11 +93,11 @@ func (s *DockerSuite) TestVolumeLsFormatDefaultFormat(c *testing.T) {
|
||||
config := `{
|
||||
"volumesFormat": "{{ .Name }} default"
|
||||
}`
|
||||
d, err := ioutil.TempDir("", "integration-cli-")
|
||||
d, err := os.MkdirTemp("", "integration-cli-")
|
||||
assert.NilError(c, err)
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
err = ioutil.WriteFile(filepath.Join(d, "config.json"), []byte(config), 0644)
|
||||
err = os.WriteFile(filepath.Join(d, "config.json"), []byte(config), 0644)
|
||||
assert.NilError(c, err)
|
||||
|
||||
out, _ := dockerCmd(c, "--config", d, "volume", "ls")
|
||||
|
||||
Reference in New Issue
Block a user