1 Star 0 Fork 0

码布什 / go工具库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
State.go 424 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhengqiuyun 提交于 2023-02-21 16:29 . Init git
package getWay
type State int16
// iota 初始化后会自动递增
const (
BusinessError State = 1001
OK State = 1000
Illegal State = 9000
LoginFailure State = -1
)
func (t State) String() string {
switch t {
case BusinessError:
return "business error"
case OK:
return "OK"
case Illegal:
return "非法请求"
case LoginFailure:
return "登陆失效"
default:
return "unknown"
}
}
Go
1
https://gitee.com/manoshi/go-util.git
git@gitee.com:manoshi/go-util.git
manoshi
go-util
go工具库
v0.1.3

搜索帮助