|
|
@@ -28,6 +28,9 @@ func (t *TypeHost) Set(value string) error {
|
|
28
|
28
|
return fmt.Errorf("incorrect host %q", value)
|
|
29
|
29
|
}
|
|
30
|
30
|
|
|
|
31
|
+ // At this point value is not a parsed IP (IPv6 literals returned
|
|
|
32
|
+ // above), so any remaining colon indicates a host:port form, which
|
|
|
33
|
+ // belongs in a separate field.
|
|
31
|
34
|
if strings.Contains(value, ":") {
|
|
32
|
35
|
return fmt.Errorf("host must not contain a port: %q", value)
|
|
33
|
36
|
}
|