mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-10-16 03:50:37 +08:00
Feature/error code 迁移到各自的包下 (#67)
This commit is contained in:
24
anyUtil/err_code.go
Normal file
24
anyUtil/err_code.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package anyUtil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrSyntax indicates that a value does not have the right syntax for the target type
|
||||
// 指示值不具有目标类型的正确语法
|
||||
ErrSyntax = strconv.ErrSyntax
|
||||
|
||||
// ErrType indicates that a value does not have the right syntax for the target type
|
||||
// 指示值不具有目标类型的正确语法
|
||||
ErrType = errors.New("unsupported type")
|
||||
|
||||
// ErrValOut Indicates that the range corresponding to the type is exceeded
|
||||
// 表示超出了类型对应的范围
|
||||
ErrValOut = errors.New("value out of range")
|
||||
|
||||
// ErrUnsignedInt The identity type is negative, so it cannot be converted to an unsigned integer
|
||||
// 标识类型为负数,所以无法转为无符号的整型
|
||||
ErrUnsignedInt = errors.New("cannot convert negative value to unsigned integer")
|
||||
)
|
Reference in New Issue
Block a user