mirror of
https://github.com/moby/moby.git
synced 2025-11-02 05:13:42 +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:
@@ -5,7 +5,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -51,7 +51,7 @@ func (s *DockerSuite) TestAttachClosedOnContainerStop(c *testing.T) {
|
||||
select {
|
||||
case err := <-errChan:
|
||||
tty.Close()
|
||||
out, _ := ioutil.ReadAll(pty)
|
||||
out, _ := io.ReadAll(pty)
|
||||
assert.Assert(c, err == nil, "out: %v", string(out))
|
||||
case <-time.After(attachWait):
|
||||
c.Fatal("timed out without attach returning")
|
||||
|
||||
Reference in New Issue
Block a user