1 Star 0 Fork 0

linxing/youye-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
error_code.go 693 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mark 提交于 2023-12-23 11:58 . init
package errors
import "net/http"
//go:generate stringer -type ErrorCode -output error_code_string.go
type ErrorCode int32
const (
OK ErrorCode = http.StatusOK
BadRequest ErrorCode = http.StatusBadRequest
Unauthorized ErrorCode = http.StatusUnauthorized
Forbidden ErrorCode = http.StatusForbidden
NotFound ErrorCode = http.StatusNotFound
MethodNotAllowed ErrorCode = http.StatusMethodNotAllowed
Timeout ErrorCode = http.StatusRequestTimeout
Conflict ErrorCode = http.StatusConflict
InternalServerError ErrorCode = http.StatusInternalServerError
)
func (e ErrorCode) Code() int32 {
return int32(e)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linxing_3/youye-core.git
git@gitee.com:linxing_3/youye-core.git
linxing_3
youye-core
youye-core
v0.0.1-202406121011

搜索帮助