1 Star 0 Fork 0

powerpaas/machine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
errors.go 1017 Bytes
一键复制 编辑 原始数据 按行查看 历史
Luther Monson 提交于 2019-11-15 16:06 . rancher-machine rename
package mcnerror
import (
"errors"
"fmt"
"strings"
"github.com/rancher/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("Docker machine %q does not exist. Use \"docker-machine ls\" to list machines. Use \"docker-machine create\" to add a new one.", e.Name)
}
type ErrHostAlreadyExists struct {
Name string
}
func (e ErrHostAlreadyExists) Error() string {
return fmt.Sprintf("Docker machine %q already exists", 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.15.0-rancher23

搜索帮助