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,7 @@ package client // import "github.com/docker/docker/client"
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -274,7 +274,7 @@ func TestNegotiateAPIVersionAutomatic(t *testing.T) {
|
||||
httpClient := newMockClient(func(req *http.Request) (*http.Response, error) {
|
||||
resp := &http.Response{StatusCode: http.StatusOK, Header: http.Header{}}
|
||||
resp.Header.Set("API-Version", pingVersion)
|
||||
resp.Body = ioutil.NopCloser(strings.NewReader("OK"))
|
||||
resp.Body = io.NopCloser(strings.NewReader("OK"))
|
||||
return resp, nil
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user