1 Star 0 Fork 0

江苏岚江智能科技有限公司 / ljmicro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
business_error.go 326 Bytes
一键复制 编辑 原始数据 按行查看 历史
吴文凯 提交于 2023-03-13 16:50 . update
package xerror
import "fmt"
type BusinessError struct {
Code string `json:"code"`
Msg string `json:"msg"`
}
func NewBusinessError(code string, msg string) *BusinessError {
return &BusinessError{
Code: code,
Msg: msg,
}
}
func (e *BusinessError) Error() string {
return fmt.Sprintf("%s code=%s", e.Msg, e.Code)
}
Go
1
https://gitee.com/jiangsu-lanjiang-intelligent/ljmicro.git
git@gitee.com:jiangsu-lanjiang-intelligent/ljmicro.git
jiangsu-lanjiang-intelligent
ljmicro
ljmicro
9f39f3984435

搜索帮助