This commit is contained in:
+2
-2
@@ -25,11 +25,11 @@ func GetListenAddressFromEnvOrFlags() (string, error) {
|
||||
pHost := flag.String("host", host, "Host address to listen to")
|
||||
pPort := flag.String("port", port, "Port to listen to")
|
||||
|
||||
if govalidator.IsHost(*pHost) {
|
||||
if !govalidator.IsHost(*pHost) {
|
||||
return "", fmt.Errorf("provided 'host' is invalid")
|
||||
}
|
||||
|
||||
if govalidator.IsPort(*pPort) {
|
||||
if !govalidator.IsPort(*pPort) {
|
||||
return "", fmt.Errorf("provided 'port' is invalid")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user