mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 02:58:26 +08:00
17 lines
241 B
Go
17 lines
241 B
Go
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
|
|
}
|
|
}
|