summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorwbc6080 <wangbincheng4@huawei.com>2023-09-18 21:23:34 +0800
committerwbc6080 <wangbincheng4@huawei.com>2023-09-18 21:23:34 +0800
commitd899b4d7e6443326788c22dee8fb8f8709872fa1 (patch)
treeb52f4db6eef1ab42ca6c6ea737110a62388bc451 /vendor
parentupdate docker package (diff)
downloadkubeedge-d899b4d7e6443326788c22dee8fb8f8709872fa1.tar.gz
update vendor
Signed-off-by: wbc6080 <wangbincheng4@huawei.com>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/docker/docker/api/types/filters/parse.go8
-rw-r--r--vendor/github.com/docker/docker/api/types/registry/registry.go49
-rw-r--r--vendor/github.com/docker/docker/api/types/time/timestamp.go6
-rw-r--r--vendor/github.com/docker/docker/client/client.go3
-rw-r--r--vendor/github.com/docker/docker/client/config_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/container_attach.go2
-rw-r--r--vendor/github.com/docker/docker/client/container_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/container_logs.go2
-rw-r--r--vendor/github.com/docker/docker/client/image_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/network_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/node_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/plugin_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/request.go13
-rw-r--r--vendor/github.com/docker/docker/client/secret_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/service_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/task_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/client/volume_inspect.go4
-rw-r--r--vendor/github.com/docker/docker/pkg/ioutils/fswriters.go5
-rw-r--r--vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go6
-rw-r--r--vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go6
-rw-r--r--vendor/github.com/docker/docker/registry/endpoint_v1.go4
-rw-r--r--vendor/github.com/docker/docker/registry/registry.go7
22 files changed, 74 insertions, 77 deletions
diff --git a/vendor/github.com/docker/docker/api/types/filters/parse.go b/vendor/github.com/docker/docker/api/types/filters/parse.go
index 4bc91cffd..b4976a347 100644
--- a/vendor/github.com/docker/docker/api/types/filters/parse.go
+++ b/vendor/github.com/docker/docker/api/types/filters/parse.go
@@ -1,4 +1,5 @@
-/*Package filters provides tools for encoding a mapping of keys to a set of
+/*
+Package filters provides tools for encoding a mapping of keys to a set of
multiple values.
*/
package filters // import "github.com/docker/docker/api/types/filters"
@@ -48,7 +49,7 @@ func (args Args) Keys() []string {
// MarshalJSON returns a JSON byte representation of the Args
func (args Args) MarshalJSON() ([]byte, error) {
if len(args.fields) == 0 {
- return []byte{}, nil
+ return []byte("{}"), nil
}
return json.Marshal(args.fields)
}
@@ -106,9 +107,6 @@ func FromJSON(p string) (Args, error) {
// UnmarshalJSON populates the Args from JSON encode bytes
func (args Args) UnmarshalJSON(raw []byte) error {
- if len(raw) == 0 {
- return nil
- }
return json.Unmarshal(raw, &args.fields)
}
diff --git a/vendor/github.com/docker/docker/api/types/registry/registry.go b/vendor/github.com/docker/docker/api/types/registry/registry.go
index 53e47084c..62a88f5be 100644
--- a/vendor/github.com/docker/docker/api/types/registry/registry.go
+++ b/vendor/github.com/docker/docker/api/types/registry/registry.go
@@ -45,31 +45,32 @@ func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) {
// IndexInfo contains information about a registry
//
// RepositoryInfo Examples:
-// {
-// "Index" : {
-// "Name" : "docker.io",
-// "Mirrors" : ["https://registry-2.docker.io/v1/", "https://registry-3.docker.io/v1/"],
-// "Secure" : true,
-// "Official" : true,
-// },
-// "RemoteName" : "library/debian",
-// "LocalName" : "debian",
-// "CanonicalName" : "docker.io/debian"
-// "Official" : true,
-// }
//
-// {
-// "Index" : {
-// "Name" : "127.0.0.1:5000",
-// "Mirrors" : [],
-// "Secure" : false,
-// "Official" : false,
-// },
-// "RemoteName" : "user/repo",
-// "LocalName" : "127.0.0.1:5000/user/repo",
-// "CanonicalName" : "127.0.0.1:5000/user/repo",
-// "Official" : false,
-// }
+// {
+// "Index" : {
+// "Name" : "docker.io",
+// "Mirrors" : ["https://registry-2.docker.io/v1/", "https://registry-3.docker.io/v1/"],
+// "Secure" : true,
+// "Official" : true,
+// },
+// "RemoteName" : "library/debian",
+// "LocalName" : "debian",
+// "CanonicalName" : "docker.io/debian"
+// "Official" : true,
+// }
+//
+// {
+// "Index" : {
+// "Name" : "127.0.0.1:5000",
+// "Mirrors" : [],
+// "Secure" : false,
+// "Official" : false,
+// },
+// "RemoteName" : "user/repo",
+// "LocalName" : "127.0.0.1:5000/user/repo",
+// "CanonicalName" : "127.0.0.1:5000/user/repo",
+// "Official" : false,
+// }
type IndexInfo struct {
// Name is the name of the registry, such as "docker.io"
Name string
diff --git a/vendor/github.com/docker/docker/api/types/time/timestamp.go b/vendor/github.com/docker/docker/api/types/time/timestamp.go
index ea3495efe..2a74b7a59 100644
--- a/vendor/github.com/docker/docker/api/types/time/timestamp.go
+++ b/vendor/github.com/docker/docker/api/types/time/timestamp.go
@@ -100,8 +100,10 @@ func GetTimestamp(value string, reference time.Time) (string, error) {
// if the incoming nanosecond portion is longer or shorter than 9 digits it is
// converted to nanoseconds. The expectation is that the seconds and
// seconds will be used to create a time variable. For example:
-// seconds, nanoseconds, err := ParseTimestamp("1136073600.000000001",0)
-// if err == nil since := time.Unix(seconds, nanoseconds)
+//
+// seconds, nanoseconds, err := ParseTimestamp("1136073600.000000001",0)
+// if err == nil since := time.Unix(seconds, nanoseconds)
+//
// returns seconds as def(aultSeconds) if value == ""
func ParseTimestamps(value string, def int64) (int64, int64, error) {
if value == "" {
diff --git a/vendor/github.com/docker/docker/client/client.go b/vendor/github.com/docker/docker/client/client.go
index 9b2b2eaeb..0d3614d5d 100644
--- a/vendor/github.com/docker/docker/client/client.go
+++ b/vendor/github.com/docker/docker/client/client.go
@@ -4,7 +4,7 @@ Package client is a Go client for the Docker Engine API.
For more information about the Engine API, see the documentation:
https://docs.docker.com/engine/api/
-Usage
+# Usage
You use the library by creating a client object and calling methods on it. The
client can be created either from environment variables with NewClientWithOpts(client.FromEnv),
@@ -37,7 +37,6 @@ For example, to list running containers (the equivalent of "docker ps"):
fmt.Printf("%s %s\n", container.ID[:10], container.Image)
}
}
-
*/
package client // import "github.com/docker/docker/client"
diff --git a/vendor/github.com/docker/docker/client/config_inspect.go b/vendor/github.com/docker/docker/client/config_inspect.go
index 7d0ce3e11..f1b0d7f75 100644
--- a/vendor/github.com/docker/docker/client/config_inspect.go
+++ b/vendor/github.com/docker/docker/client/config_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types/swarm"
)
@@ -23,7 +23,7 @@ func (cli *Client) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.C
return swarm.Config{}, nil, wrapResponseError(err, resp, "config", id)
}
- body, err := ioutil.ReadAll(resp.body)
+ body, err := io.ReadAll(resp.body)
if err != nil {
return swarm.Config{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/container_attach.go b/vendor/github.com/docker/docker/client/container_attach.go
index 88ba1ef63..3becefba0 100644
--- a/vendor/github.com/docker/docker/client/container_attach.go
+++ b/vendor/github.com/docker/docker/client/container_attach.go
@@ -22,7 +22,7 @@ import (
// multiplexed.
// The format of the multiplexed stream is as follows:
//
-// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}
+// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}
//
// STREAM_TYPE can be 1 for stdout and 2 for stderr
//
diff --git a/vendor/github.com/docker/docker/client/container_inspect.go b/vendor/github.com/docker/docker/client/container_inspect.go
index c496bcffe..43db32bd9 100644
--- a/vendor/github.com/docker/docker/client/container_inspect.go
+++ b/vendor/github.com/docker/docker/client/container_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"net/url"
"github.com/docker/docker/api/types"
@@ -41,7 +41,7 @@ func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID stri
return types.ContainerJSON{}, nil, wrapResponseError(err, serverResp, "container", containerID)
}
- body, err := ioutil.ReadAll(serverResp.body)
+ body, err := io.ReadAll(serverResp.body)
if err != nil {
return types.ContainerJSON{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/container_logs.go b/vendor/github.com/docker/docker/client/container_logs.go
index 5b6541f03..add852a83 100644
--- a/vendor/github.com/docker/docker/client/container_logs.go
+++ b/vendor/github.com/docker/docker/client/container_logs.go
@@ -24,7 +24,7 @@ import (
// multiplexed.
// The format of the multiplexed stream is as follows:
//
-// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}
+// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT}
//
// STREAM_TYPE can be 1 for stdout and 2 for stderr
//
diff --git a/vendor/github.com/docker/docker/client/image_inspect.go b/vendor/github.com/docker/docker/client/image_inspect.go
index 1eb8dce02..03aa12d8b 100644
--- a/vendor/github.com/docker/docker/client/image_inspect.go
+++ b/vendor/github.com/docker/docker/client/image_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types"
)
@@ -20,7 +20,7 @@ func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (typ
return types.ImageInspect{}, nil, wrapResponseError(err, serverResp, "image", imageID)
}
- body, err := ioutil.ReadAll(serverResp.body)
+ body, err := io.ReadAll(serverResp.body)
if err != nil {
return types.ImageInspect{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/network_inspect.go b/vendor/github.com/docker/docker/client/network_inspect.go
index 89a05b302..ecf20ceb6 100644
--- a/vendor/github.com/docker/docker/client/network_inspect.go
+++ b/vendor/github.com/docker/docker/client/network_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"net/url"
"github.com/docker/docker/api/types"
@@ -39,7 +39,7 @@ func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string,
return networkResource, nil, wrapResponseError(err, resp, "network", networkID)
}
- body, err := ioutil.ReadAll(resp.body)
+ body, err := io.ReadAll(resp.body)
if err != nil {
return networkResource, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/node_inspect.go b/vendor/github.com/docker/docker/client/node_inspect.go
index d296c9fdd..b58db5285 100644
--- a/vendor/github.com/docker/docker/client/node_inspect.go
+++ b/vendor/github.com/docker/docker/client/node_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types/swarm"
)
@@ -20,7 +20,7 @@ func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm
return swarm.Node{}, nil, wrapResponseError(err, serverResp, "node", nodeID)
}
- body, err := ioutil.ReadAll(serverResp.body)
+ body, err := io.ReadAll(serverResp.body)
if err != nil {
return swarm.Node{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/plugin_inspect.go b/vendor/github.com/docker/docker/client/plugin_inspect.go
index 81b89732b..4a90bec51 100644
--- a/vendor/github.com/docker/docker/client/plugin_inspect.go
+++ b/vendor/github.com/docker/docker/client/plugin_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types"
)
@@ -20,7 +20,7 @@ func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*type
return nil, nil, wrapResponseError(err, resp, "plugin", name)
}
- body, err := ioutil.ReadAll(resp.body)
+ body, err := io.ReadAll(resp.body)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/request.go b/vendor/github.com/docker/docker/client/request.go
index 7f54b1dd8..d3d9a3fe6 100644
--- a/vendor/github.com/docker/docker/client/request.go
+++ b/vendor/github.com/docker/docker/client/request.go
@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/url"
@@ -129,7 +128,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
}
if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") {
- return serverResp, errors.Wrap(err, "The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings")
+ return serverResp, errors.Wrap(err, "the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings")
}
// Don't decorate context sentinel errors; users may be comparing to
@@ -141,7 +140,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
if nErr, ok := err.(*url.Error); ok {
if nErr, ok := nErr.Err.(*net.OpError); ok {
if os.IsPermission(nErr.Err) {
- return serverResp, errors.Wrapf(err, "Got permission denied while trying to connect to the Docker daemon socket at %v", cli.host)
+ return serverResp, errors.Wrapf(err, "permission denied while trying to connect to the Docker daemon socket at %v", cli.host)
}
}
}
@@ -168,10 +167,10 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp
if strings.Contains(err.Error(), `open //./pipe/docker_engine`) {
// Checks if client is running with elevated privileges
if f, elevatedErr := os.Open("\\\\.\\PHYSICALDRIVE0"); elevatedErr == nil {
- err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.")
+ err = errors.Wrap(err, "in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect")
} else {
f.Close()
- err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.")
+ err = errors.Wrap(err, "this error may indicate that the docker daemon is not running")
}
}
@@ -199,7 +198,7 @@ func (cli *Client) checkResponseErr(serverResp serverResponse) error {
R: serverResp.body,
N: int64(bodyMax),
}
- body, err = ioutil.ReadAll(bodyR)
+ body, err = io.ReadAll(bodyR)
if err != nil {
return err
}
@@ -259,7 +258,7 @@ func encodeData(data interface{}) (*bytes.Buffer, error) {
func ensureReaderClosed(response serverResponse) {
if response.body != nil {
// Drain up to 512 bytes and close the body to let the Transport reuse the connection
- io.CopyN(ioutil.Discard, response.body, 512)
+ io.CopyN(io.Discard, response.body, 512)
response.body.Close()
}
}
diff --git a/vendor/github.com/docker/docker/client/secret_inspect.go b/vendor/github.com/docker/docker/client/secret_inspect.go
index d093916c9..c07c9550d 100644
--- a/vendor/github.com/docker/docker/client/secret_inspect.go
+++ b/vendor/github.com/docker/docker/client/secret_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types/swarm"
)
@@ -23,7 +23,7 @@ func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) (swarm.S
return swarm.Secret{}, nil, wrapResponseError(err, resp, "secret", id)
}
- body, err := ioutil.ReadAll(resp.body)
+ body, err := io.ReadAll(resp.body)
if err != nil {
return swarm.Secret{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/service_inspect.go b/vendor/github.com/docker/docker/client/service_inspect.go
index 2801483b8..c5368bab1 100644
--- a/vendor/github.com/docker/docker/client/service_inspect.go
+++ b/vendor/github.com/docker/docker/client/service_inspect.go
@@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/url"
"github.com/docker/docker/api/types"
@@ -25,7 +25,7 @@ func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string,
return swarm.Service{}, nil, wrapResponseError(err, serverResp, "service", serviceID)
}
- body, err := ioutil.ReadAll(serverResp.body)
+ body, err := io.ReadAll(serverResp.body)
if err != nil {
return swarm.Service{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/task_inspect.go b/vendor/github.com/docker/docker/client/task_inspect.go
index 44d40ba5a..fb0949da5 100644
--- a/vendor/github.com/docker/docker/client/task_inspect.go
+++ b/vendor/github.com/docker/docker/client/task_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types/swarm"
)
@@ -20,7 +20,7 @@ func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm
return swarm.Task{}, nil, wrapResponseError(err, serverResp, "task", taskID)
}
- body, err := ioutil.ReadAll(serverResp.body)
+ body, err := io.ReadAll(serverResp.body)
if err != nil {
return swarm.Task{}, nil, err
}
diff --git a/vendor/github.com/docker/docker/client/volume_inspect.go b/vendor/github.com/docker/docker/client/volume_inspect.go
index e20b2c67c..5c5b3f905 100644
--- a/vendor/github.com/docker/docker/client/volume_inspect.go
+++ b/vendor/github.com/docker/docker/client/volume_inspect.go
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
- "io/ioutil"
+ "io"
"github.com/docker/docker/api/types"
)
@@ -28,7 +28,7 @@ func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (t
return volume, nil, wrapResponseError(err, resp, "volume", volumeID)
}
- body, err := ioutil.ReadAll(resp.body)
+ body, err := io.ReadAll(resp.body)
if err != nil {
return volume, nil, err
}
diff --git a/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go b/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go
index 534d66ac2..82671d8cd 100644
--- a/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go
+++ b/vendor/github.com/docker/docker/pkg/ioutils/fswriters.go
@@ -2,7 +2,6 @@ package ioutils // import "github.com/docker/docker/pkg/ioutils"
import (
"io"
- "io/ioutil"
"os"
"path/filepath"
)
@@ -11,7 +10,7 @@ import (
// temporary file and closing it atomically changes the temporary file to
// destination path. Writing and closing concurrently is not allowed.
func NewAtomicFileWriter(filename string, perm os.FileMode) (io.WriteCloser, error) {
- f, err := ioutil.TempFile(filepath.Dir(filename), ".tmp-"+filepath.Base(filename))
+ f, err := os.CreateTemp(filepath.Dir(filename), ".tmp-"+filepath.Base(filename))
if err != nil {
return nil, err
}
@@ -94,7 +93,7 @@ type AtomicWriteSet struct {
// commit. If no temporary directory is given the system
// default is used.
func NewAtomicWriteSet(tmpDir string) (*AtomicWriteSet, error) {
- td, err := ioutil.TempDir(tmpDir, "write-set-")
+ td, err := os.MkdirTemp(tmpDir, "write-set-")
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go b/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go
index 4e67ec2f5..748912230 100644
--- a/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go
+++ b/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go
@@ -3,9 +3,9 @@
package ioutils // import "github.com/docker/docker/pkg/ioutils"
-import "io/ioutil"
+import "os"
-// TempDir on Unix systems is equivalent to ioutil.TempDir.
+// TempDir on Unix systems is equivalent to os.MkdirTemp.
func TempDir(dir, prefix string) (string, error) {
- return ioutil.TempDir(dir, prefix)
+ return os.MkdirTemp(dir, prefix)
}
diff --git a/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go b/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go
index ecaba2e36..a57fd9af6 100644
--- a/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go
+++ b/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go
@@ -1,14 +1,14 @@
package ioutils // import "github.com/docker/docker/pkg/ioutils"
import (
- "io/ioutil"
+ "os"
"github.com/docker/docker/pkg/longpath"
)
-// TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format.
+// TempDir is the equivalent of os.MkdirTemp, except that the result is in Windows longpath format.
func TempDir(dir, prefix string) (string, error) {
- tempDir, err := ioutil.TempDir(dir, prefix)
+ tempDir, err := os.MkdirTemp(dir, prefix)
if err != nil {
return "", err
}
diff --git a/vendor/github.com/docker/docker/registry/endpoint_v1.go b/vendor/github.com/docker/docker/registry/endpoint_v1.go
index a355a4f87..3b5ab2f5f 100644
--- a/vendor/github.com/docker/docker/registry/endpoint_v1.go
+++ b/vendor/github.com/docker/docker/registry/endpoint_v1.go
@@ -4,7 +4,7 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"net/http"
"net/url"
"strings"
@@ -158,7 +158,7 @@ func (e *V1Endpoint) Ping() (PingResult, error) {
defer resp.Body.Close()
- jsonString, err := ioutil.ReadAll(resp.Body)
+ jsonString, err := io.ReadAll(resp.Body)
if err != nil {
return PingResult{Standalone: false}, fmt.Errorf("error while reading the http response: %s", err)
}
diff --git a/vendor/github.com/docker/docker/registry/registry.go b/vendor/github.com/docker/docker/registry/registry.go
index 7a70bf28b..bcf2509f2 100644
--- a/vendor/github.com/docker/docker/registry/registry.go
+++ b/vendor/github.com/docker/docker/registry/registry.go
@@ -5,7 +5,6 @@ import (
"crypto/tls"
"errors"
"fmt"
- "io/ioutil"
"net"
"net/http"
"os"
@@ -54,7 +53,7 @@ func newTLSConfig(hostname string, isSecure bool) (*tls.Config, error) {
return tlsConfig, nil
}
-func hasFile(files []os.FileInfo, name string) bool {
+func hasFile(files []os.DirEntry, name string) bool {
for _, f := range files {
if f.Name() == name {
return true
@@ -67,7 +66,7 @@ func hasFile(files []os.FileInfo, name string) bool {
// including roots and certificate pairs and updates the
// provided TLS configuration.
func ReadCertsDirectory(tlsConfig *tls.Config, directory string) error {
- fs, err := ioutil.ReadDir(directory)
+ fs, err := os.ReadDir(directory)
if err != nil && !os.IsNotExist(err) {
return err
}
@@ -82,7 +81,7 @@ func ReadCertsDirectory(tlsConfig *tls.Config, directory string) error {
tlsConfig.RootCAs = systemPool
}
logrus.Debugf("crt: %s", filepath.Join(directory, f.Name()))
- data, err := ioutil.ReadFile(filepath.Join(directory, f.Name()))
+ data, err := os.ReadFile(filepath.Join(directory, f.Name()))
if err != nil {
return err
}