1 Star 0 Fork 8

levphon/docker-cli

forked from mirrors_back/docker-cli 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
error.go 465 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sebastiaan van Stijn 提交于 2024-10-19 17:00 +08:00 . cli: remove deprecated Errors type
package cli
import (
"strconv"
)
// StatusError reports an unsuccessful exit by a command.
type StatusError struct {
Status string
StatusCode int
}
// Error formats the error for printing. If a custom Status is provided,
// it is returned as-is, otherwise it generates a generic error-message
// based on the StatusCode.
func (e StatusError) Error() string {
if e.Status == "" {
return "exit status " + strconv.Itoa(e.StatusCode)
}
return e.Status
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/levphon/docker-cli.git
git@gitee.com:levphon/docker-cli.git
levphon
docker-cli
docker-cli
master

搜索帮助