utils.go 271 B

1234567891011
  1. package database
  2. import "strings"
  3. // IsEmptyRecord - checks for if it's an empty record error or not
  4. func IsEmptyRecord(err error) bool {
  5. if err == nil {
  6. return false
  7. }
  8. return strings.Contains(err.Error(), NO_RECORD) || strings.Contains(err.Error(), NO_RECORDS)
  9. }