Add more detailed info to hostname validation error
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
2
host.go
2
host.go
@@ -28,7 +28,7 @@ import (
|
||||
var (
|
||||
validHostNameChars = `[a-zA-Z0-9\-\.]`
|
||||
validHostNamePattern = regexp.MustCompile(`^` + validHostNameChars + `+$`)
|
||||
ErrInvalidHostname = errors.New("Invalid hostname specified")
|
||||
ErrInvalidHostname = errors.New("Invalid hostname specified. Hostnames must be comprised only of alphanumeric characters, \".\", or \"-\".")
|
||||
ErrUnknownHypervisorType = errors.New("Unknown hypervisor type")
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user