Files
open-im-server/internal/rpc/msg/utils.go
T

17 lines
241 B
Go
Raw Normal View History

2023-02-13 10:33:54 +08:00
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
}
}