forked from toolshed/abra
chore: bump deps
This commit is contained in:
6
vendor/github.com/docker/go-connections/nat/parse.go
generated
vendored
6
vendor/github.com/docker/go-connections/nat/parse.go
generated
vendored
@ -1,7 +1,7 @@
|
||||
package nat
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@ -9,7 +9,7 @@ import (
|
||||
// ParsePortRange parses and validates the specified string as a port-range (8000-9000)
|
||||
func ParsePortRange(ports string) (uint64, uint64, error) {
|
||||
if ports == "" {
|
||||
return 0, 0, fmt.Errorf("empty string specified for ports")
|
||||
return 0, 0, errors.New("empty string specified for ports")
|
||||
}
|
||||
if !strings.Contains(ports, "-") {
|
||||
start, err := strconv.ParseUint(ports, 10, 16)
|
||||
@ -27,7 +27,7 @@ func ParsePortRange(ports string) (uint64, uint64, error) {
|
||||
return 0, 0, err
|
||||
}
|
||||
if end < start {
|
||||
return 0, 0, fmt.Errorf("invalid range specified for port: %s", ports)
|
||||
return 0, 0, errors.New("invalid range specified for port: " + ports)
|
||||
}
|
||||
return start, end, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user