mirror of
https://github.com/moby/moby.git
synced 2025-11-09 13:41:11 +03: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:
@@ -6,7 +6,6 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -28,7 +27,7 @@ func (s *DockerSuite) TestSaveAndLoadRepoStdout(c *testing.T) {
|
||||
before, _ := dockerCmd(c, "commit", name, repoName)
|
||||
before = strings.TrimRight(before, "\n")
|
||||
|
||||
tmpFile, err := ioutil.TempFile("", "foobar-save-load-test.tar")
|
||||
tmpFile, err := os.CreateTemp("", "foobar-save-load-test.tar")
|
||||
assert.NilError(c, err)
|
||||
defer os.Remove(tmpFile.Name())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user