Skip to content

Commit 3435036

Browse files
author
chenjie
committed
update
1 parent 41aa7d8 commit 3435036

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

util/error/error.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import (
99
//if error was not in this error's format,code will return -1,msg will use the origin error.Error()
1010

1111
type Error struct {
12-
Code int64 `json:"code"`
12+
Code int32 `json:"code"`
1313
Msg string `json:"msg"`
1414
}
1515

16-
func MakeError(code int64, msg string) *Error {
16+
func MakeError(code int32, msg string) *Error {
1717
return &Error{Code: code, Msg: msg}
1818
}
19-
func GetCodeFromErrorstr(e string) int64 {
19+
func GetCodeFromErrorstr(e string) int32 {
2020
if e == "" {
2121
return 0
2222
}
@@ -26,7 +26,7 @@ func GetCodeFromErrorstr(e string) int64 {
2626
}
2727
return tempe.Code
2828
}
29-
func GetCodeFromStdError(e error) int64 {
29+
func GetCodeFromStdError(e error) int32 {
3030
if e == nil {
3131
return 0
3232
}

0 commit comments

Comments
 (0)