summaryrefslogtreecommitdiff
path: root/client/network_connect_test.go
diff options
context:
space:
mode:
authorEng Zer Jun <engzerjun@gmail.com>2021-08-24 18:10:50 +0800
committerEng Zer Jun <engzerjun@gmail.com>2021-08-27 14:56:57 +0800
commitc55a4ac7795c7606b548b38e24673733481e2167 (patch)
tree8ea03bdc842959cd3d04a3e37a4ce2a71fa77dbb /client/network_connect_test.go
parent2b70006e3bfa492b8641ff443493983d832955f4 (diff)
downloaddocker-c55a4ac7795c7606b548b38e24673733481e2167.tar.gz
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>
Diffstat (limited to 'client/network_connect_test.go')
-rw-r--r--client/network_connect_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/network_connect_test.go b/client/network_connect_test.go
index 75141b6a22..30f2f254d6 100644
--- a/client/network_connect_test.go
+++ b/client/network_connect_test.go
@@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"strings"
"testing"
@@ -54,7 +54,7 @@ func TestNetworkConnectEmptyNilEndpointSettings(t *testing.T) {
return &http.Response{
StatusCode: http.StatusOK,
- Body: ioutil.NopCloser(bytes.NewReader([]byte(""))),
+ Body: io.NopCloser(bytes.NewReader([]byte(""))),
}, nil
}),
}
@@ -97,7 +97,7 @@ func TestNetworkConnect(t *testing.T) {
return &http.Response{
StatusCode: http.StatusOK,
- Body: ioutil.NopCloser(bytes.NewReader([]byte(""))),
+ Body: io.NopCloser(bytes.NewReader([]byte(""))),
}, nil
}),
}