summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/client.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-05-04 13:23:33 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-05-05 04:41:06 -0400
commited159f864dc8e2cd79d98fb46a28f1413dc1a7fb (patch)
tree612c1c0010014522962866c47bc570d9860770be /vendor/github.com/fsouza/go-dockerclient/client.go
parentbdaac4b2b6573d0954c58da9968536017160b1ed (diff)
downloadpodman-ed159f864dc8e2cd79d98fb46a28f1413dc1a7fb.tar.gz
podman-ed159f864dc8e2cd79d98fb46a28f1413dc1a7fb.tar.bz2
podman-ed159f864dc8e2cd79d98fb46a28f1413dc1a7fb.zip
Vendor in containers/buildah@v1.26.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/client.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go
index d0814a5c0..1bbf611a2 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client.go
@@ -17,7 +17,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/http/httputil"
@@ -240,19 +239,19 @@ func NewVersionedTLSClient(endpoint string, cert, key, ca, apiVersionString stri
var keyPEMBlock []byte
var caPEMCert []byte
if _, err := os.Stat(cert); !os.IsNotExist(err) {
- certPEMBlock, err = ioutil.ReadFile(cert)
+ certPEMBlock, err = os.ReadFile(cert)
if err != nil {
return nil, err
}
}
if _, err := os.Stat(key); !os.IsNotExist(err) {
- keyPEMBlock, err = ioutil.ReadFile(key)
+ keyPEMBlock, err = os.ReadFile(key)
if err != nil {
return nil, err
}
}
if _, err := os.Stat(ca); !os.IsNotExist(err) {
- caPEMCert, err = ioutil.ReadFile(ca)
+ caPEMCert, err = os.ReadFile(ca)
if err != nil {
return nil, err
}
@@ -565,10 +564,10 @@ func (c *Client) streamURL(method, url string, streamOptions streamOptions) erro
protocol := c.endpointURL.Scheme
address := c.endpointURL.Path
if streamOptions.stdout == nil {
- streamOptions.stdout = ioutil.Discard
+ streamOptions.stdout = io.Discard
}
if streamOptions.stderr == nil {
- streamOptions.stderr = ioutil.Discard
+ streamOptions.stderr = io.Discard
}
if protocol == unixProtocol || protocol == namedPipeProtocol {
@@ -798,10 +797,10 @@ func (c *Client) hijack(method, path string, hijackOptions hijackOptions) (Close
// will "hang" until the container terminates, even though you're not reading
// stdout/stderr
if hijackOptions.stdout == nil {
- hijackOptions.stdout = ioutil.Discard
+ hijackOptions.stdout = io.Discard
}
if hijackOptions.stderr == nil {
- hijackOptions.stderr = ioutil.Discard
+ hijackOptions.stderr = io.Discard
}
go func() {
@@ -1024,7 +1023,7 @@ func newError(resp *http.Response) *Error {
Message string `json:"message"`
}
defer resp.Body.Close()
- data, err := ioutil.ReadAll(resp.Body)
+ data, err := io.ReadAll(resp.Body)
if err != nil {
return &Error{Status: resp.StatusCode, Message: fmt.Sprintf("cannot read body, err: %v", err)}
}