add NewErrorCode

This commit is contained in:
hong
2021-11-22 21:35:18 +08:00
parent b4fdcf178c
commit 0fffac1bbb

View File

@@ -10,6 +10,10 @@ const (
type ErrorCode int64
func NewErrCode(code int64) ErrorCode {
return ErrorCode(code)
}
func (ec ErrorCode) Int() int {
return int(ec)
}