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 (
|
||||
"archive/tar"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
@@ -123,7 +122,7 @@ func (s *DockerSchema1RegistrySuite) TestPushMultipleTags(c *testing.T) {
|
||||
|
||||
func testPushEmptyLayer(c *testing.T) {
|
||||
repoName := fmt.Sprintf("%v/dockercli/emptylayer", privateRegistryURL)
|
||||
emptyTarball, err := ioutil.TempFile("", "empty_tarball")
|
||||
emptyTarball, err := os.CreateTemp("", "empty_tarball")
|
||||
assert.NilError(c, err, "Unable to create test file")
|
||||
|
||||
tw := tar.NewWriter(emptyTarball)
|
||||
|
||||
Reference in New Issue
Block a user