mirror of
https://github.com/pyihe/go-pkg.git
synced 2025-10-08 09:20:12 +08:00
errors
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultErrCode ErrorCode = -1
|
||||
DefaultErrCode ErrorCode = 100000
|
||||
)
|
||||
|
||||
type ErrorCode int64
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user