summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/client.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-26 11:23:46 -0400
committerMatthew Heon <mheon@redhat.com>2021-03-29 11:06:03 -0400
commite7dc66d832d44eac11cb341f09844850e3e0224d (patch)
treee836a3d9a5ff60c9019e3daf2601d3c922af2a38 /vendor/github.com/fsouza/go-dockerclient/client.go
parent57e0d8f2930690de69c690c41e30abaa2cdb3776 (diff)
downloadpodman-e7dc66d832d44eac11cb341f09844850e3e0224d.tar.gz
podman-e7dc66d832d44eac11cb341f09844850e3e0224d.tar.bz2
podman-e7dc66d832d44eac11cb341f09844850e3e0224d.zip
[NO TESTS NEEDED] Vendor in containers/buildah v1.20.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> <MH: Fixed cherry-pick conflicts. Re-ran vendor.> Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/client.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go
index a1bccd68f..d0814a5c0 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client.go
@@ -777,10 +777,9 @@ func (c *Client) hijack(method, path string, hijackOptions hijackOptions) (Close
errs := make(chan error, 1)
quit := make(chan struct{})
go func() {
- //nolint:staticcheck
+ //lint:ignore SA1019 the alternative doesn't quite work, so keep using the deprecated thing.
clientconn := httputil.NewClientConn(dial, nil)
defer clientconn.Close()
- //nolint:bodyclose
clientconn.Do(req)
if hijackOptions.success != nil {
hijackOptions.success <- struct{}{}
@@ -959,7 +958,6 @@ func queryString(opts interface{}) string {
}
func addQueryStringValue(items url.Values, key string, v reflect.Value) bool {
- //nolint:exhaustive
switch v.Kind() {
case reflect.Bool:
if v.Bool() {
@@ -1059,7 +1057,8 @@ func parseEndpoint(endpoint string, tls bool) (*url.URL, error) {
case "http", "https", "tcp":
_, port, err := net.SplitHostPort(u.Host)
if err != nil {
- if e, ok := err.(*net.AddrError); ok {
+ var e *net.AddrError
+ if errors.As(err, &e) {
if e.Err == "missing port in address" {
return u, nil
}