You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package msg
|
|
|
|
import (
|
|
"Open_IM/pkg/utils"
|
|
"github.com/go-redis/redis/v8"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func IsNotFound(err error) bool {
|
|
switch utils.Unwrap(err) {
|
|
case gorm.ErrRecordNotFound, redis.Nil:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|