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:
@@ -6,7 +6,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -173,7 +172,7 @@ func (s *DockerSuite) TestLogsAPIUntil(c *testing.T) {
|
||||
assert.NilError(c, err)
|
||||
|
||||
actualStdout := new(bytes.Buffer)
|
||||
actualStderr := ioutil.Discard
|
||||
actualStderr := io.Discard
|
||||
_, err = stdcopy.StdCopy(actualStdout, actualStderr, reader)
|
||||
assert.NilError(c, err)
|
||||
|
||||
@@ -210,7 +209,7 @@ func (s *DockerSuite) TestLogsAPIUntilDefaultValue(c *testing.T) {
|
||||
assert.NilError(c, err)
|
||||
|
||||
actualStdout := new(bytes.Buffer)
|
||||
actualStderr := ioutil.Discard
|
||||
actualStderr := io.Discard
|
||||
_, err = stdcopy.StdCopy(actualStdout, actualStderr, reader)
|
||||
assert.NilError(c, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user