1 Star 0 Fork 0

powerpaas/machine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
errors.go 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
package mcnerror
import (
"errors"
"fmt"
"strings"
"github.com/docker/machine/libmachine/state"
)
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)
}
type ErrDuringPreCreate struct {
Cause error
}
func (e ErrDuringPreCreate) Error() string {
return fmt.Sprintf("Error with pre-create check: %q", e.Cause)
}
type ErrHostAlreadyInState struct {
Name string
State state.State
}
func (e ErrHostAlreadyInState) Error() string {
return fmt.Sprintf("Machine %q is already %s.", e.Name, strings.ToLower(e.State.String()))
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/powerpaas/machine.git
git@gitee.com:powerpaas/machine.git
powerpaas
machine
machine
v0.8.0-rc1

搜索帮助