mongodb/error.go

13 lines
210 B
Go

package mongodb
import (
"errors"
"go.mongodb.org/mongo-driver/mongo"
)
// IsErrNotFound check err is not found document
func IsErrNotFound(err error) bool {
return errors.Is(err, mongo.ErrNoDocuments)
}