mongodb/error.go

13 lines
210 B
Go
Raw Permalink Normal View History

2021-11-10 09:40:11 +00:00
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)
}