Line 0
Link Here
|
|
|
1 |
--- utils.go |
2 |
+++ utils.go |
3 |
@@ -146,7 +146,7 @@ func validAddress(input string) { |
4 |
if len(tokens) != 2 { |
5 |
die(input + " is not a valid value for an address\nExpected format <ip or hostname>:<port>") |
6 |
} |
7 |
- matched, err := regexp.MatchString("^[a-zA-Z0-9]+([a-zA-Z0-9.]+[a-zA-Z0-9]+)?$", tokens[0]) |
8 |
+ matched, err := regexp.MatchString("^[a-zA-Z0-9]+([-a-zA-Z0-9.]+[-a-zA-Z0-9]+)?$", tokens[0]) |
9 |
die(err) |
10 |
if !matched { |
11 |
die(input + " is not a valid value for an address\nExpected format <ip or hostname>:<port>") |