mirror of
https://github.com/pyihe/go-pkg.git
synced 2025-10-07 08:50:51 +08:00
add NewErrorCode
This commit is contained in:
@@ -10,6 +10,10 @@ const (
|
|||||||
|
|
||||||
type ErrorCode int64
|
type ErrorCode int64
|
||||||
|
|
||||||
|
func NewErrCode(code int64) ErrorCode {
|
||||||
|
return ErrorCode(code)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec ErrorCode) Int() int {
|
func (ec ErrorCode) Int() int {
|
||||||
return int(ec)
|
return int(ec)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user