Skip to content

Commit

Permalink
Remove IsRecordNotFoundError method (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdeme authored Mar 31, 2023
1 parent 47777f6 commit 219d979
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ var (
// Errors contains all happened errors
type Errors []error

// IsRecordNotFoundError returns true if error contains a RecordNotFound error
func IsRecordNotFoundError(err error) bool {
if errs, ok := err.(Errors); ok {
for _, err := range errs {
if err == ErrRecordNotFound {
return true
}
}
}
return err == ErrRecordNotFound
}

// GetErrors gets all errors that have occurred and returns a slice of errors (Error type)
func (errs Errors) GetErrors() []error {
return errs
Expand Down

0 comments on commit 219d979

Please sign in to comment.