Files
docker-machine/libmachine/mcnerror/errors.go
David Gageot 8bbfc6ef2a Remove unused code
Signed-off-by: David Gageot <david@gageot.net>
2015-11-13 16:27:50 +01:00

27 lines
471 B
Go

package mcnerror
import (
"errors"
"fmt"
)
var (
ErrInvalidHostname = errors.New("Invalid hostname specified. Allowed hostname chars are: 0-9a-zA-Z . -")
)
type ErrHostDoesNotExist struct {
Name string
}
func (e ErrHostDoesNotExist) Error() string {
return fmt.Sprintf("Host does not exist: %q", e.Name)
}
type ErrHostAlreadyExists struct {
Name string
}
func (e ErrHostAlreadyExists) Error() string {
return fmt.Sprintf("Host already exists: %q", e.Name)
}