This commit is contained in:
hong
2021-12-05 02:03:47 +08:00
parent 0fffac1bbb
commit 723a6540fd
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ import (
)
const (
DefaultErrCode ErrorCode = -1
DefaultErrCode ErrorCode = 100000
)
type ErrorCode int64

View File

@@ -39,7 +39,7 @@ func (e *_err) Error() string {
if e == nil {
return ""
}
return fmt.Sprintf("err: %d-%s", e.code, e.msg)
return fmt.Sprintf("code: %d err: %s", e.code, e.msg)
}
func (e *_err) Code() ErrorCode {