aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/client.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-04 11:08:43 +0200
committerGitHub <noreply@github.com>2020-05-04 11:08:43 +0200
commit51d0be42046f691e81cddfe2712baa14cecbdfbe (patch)
tree31a4708b600b60a5a9c5529637721f1a5d88e195 /vendor/github.com/fsouza/go-dockerclient/client.go
parent7b941462d42aa76b134462ff92a6823359d2cf76 (diff)
parent7d37f4bbfee8def704cf38ec74f91e3e0db61723 (diff)
downloadpodman-51d0be42046f691e81cddfe2712baa14cecbdfbe.tar.gz
podman-51d0be42046f691e81cddfe2712baa14cecbdfbe.tar.bz2
podman-51d0be42046f691e81cddfe2712baa14cecbdfbe.zip
Merge pull request #6051 from rhatdan/containers.conf
Fixes for test/e2e/containers_conf_test.go
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/client.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/client.go18
1 files changed, 7 insertions, 11 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/client.go b/vendor/github.com/fsouza/go-dockerclient/client.go
index 825ba38ab..b176e86bd 100644
--- a/vendor/github.com/fsouza/go-dockerclient/client.go
+++ b/vendor/github.com/fsouza/go-dockerclient/client.go
@@ -87,32 +87,29 @@ func NewAPIVersion(input string) (APIVersion, error) {
}
func (version APIVersion) String() string {
- var str string
+ parts := make([]string, len(version))
for i, val := range version {
- str += strconv.Itoa(val)
- if i < len(version)-1 {
- str += "."
- }
+ parts[i] = strconv.Itoa(val)
}
- return str
+ return strings.Join(parts, ".")
}
-// LessThan is a function for comparing APIVersion structs
+// LessThan is a function for comparing APIVersion structs.
func (version APIVersion) LessThan(other APIVersion) bool {
return version.compare(other) < 0
}
-// LessThanOrEqualTo is a function for comparing APIVersion structs
+// LessThanOrEqualTo is a function for comparing APIVersion structs.
func (version APIVersion) LessThanOrEqualTo(other APIVersion) bool {
return version.compare(other) <= 0
}
-// GreaterThan is a function for comparing APIVersion structs
+// GreaterThan is a function for comparing APIVersion structs.
func (version APIVersion) GreaterThan(other APIVersion) bool {
return version.compare(other) > 0
}
-// GreaterThanOrEqualTo is a function for comparing APIVersion structs
+// GreaterThanOrEqualTo is a function for comparing APIVersion structs.
func (version APIVersion) GreaterThanOrEqualTo(other APIVersion) bool {
return version.compare(other) >= 0
}
@@ -512,7 +509,6 @@ type streamOptions struct {
context context.Context
}
-// if error in context, return that instead of generic http error
func chooseError(ctx context.Context, err error) error {
select {
case <-ctx.Done():