diff --git a/const.go b/const.go index 475f9fd..d738db9 100644 --- a/const.go +++ b/const.go @@ -1,3 +1,3 @@ package dorm -const Version = "1.0.22" +const Version = "1.0.23" diff --git a/gorm_error.go b/gorm_error.go new file mode 100644 index 0000000..ab646d8 --- /dev/null +++ b/gorm_error.go @@ -0,0 +1,8 @@ +package dorm + +import "gorm.io/gorm" + +var ( + // GormErrRecordNotFound 没有数据 + GormErrRecordNotFound = gorm.ErrRecordNotFound +) diff --git a/redis_error.go b/redis_error.go new file mode 100644 index 0000000..f76df1e --- /dev/null +++ b/redis_error.go @@ -0,0 +1,12 @@ +package dorm + +import ( + "errors" +) + +var ( + // RedisNotFound 没有数据 + RedisNotFound = errors.New("redis: nil") + // RedisKeysNotFound keys没有数据 + RedisKeysNotFound = errors.New("ERR wrong number of arguments for 'mget' command") +)