Fix inconsistency in IP address parsing errors

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a30fd7a962f8486df0d0dbd3334c7621d22c1aec
Component: engine
This commit is contained in:
Solomon Hykes
2014-08-13 06:45:40 +00:00
parent fc0d245526
commit 1c51cd6125

View File

@ -20,7 +20,7 @@ func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt {
func (o *IpOpt) Set(val string) error {
ip := net.ParseIP(val)
if ip == nil {
return fmt.Errorf("incorrect IP format")
return fmt.Errorf("%s is not an ip address", val)
}
(*o.IP) = net.ParseIP(val)
return nil