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