Skip to content

Commit

Permalink
chore: Fix concrete error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pgollangi committed Nov 16, 2023
1 parent 8c17ecc commit 596770f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/select/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (sel *SelectStatement) Execute() (*util.QueryResult, error) {

func (sel *SelectStatement) readResults(docs *firestore.DocumentIterator, selectedColumns []*selectColumn) (*util.QueryResult, error) {
document, err := docs.Next()
if err == iterator.Done {
if errors.Is(err, iterator.Done) {
var columns []string
for _, column := range selectedColumns {
columns = append(columns, column.alias)
Expand Down Expand Up @@ -147,7 +147,7 @@ func (sel *SelectStatement) readResults(docs *firestore.DocumentIterator, select
row[idx] = val
}
document, err = docs.Next()
if err == iterator.Done {
if errors.Is(err, iterator.Done) {
break
}
}
Expand Down

0 comments on commit 596770f

Please sign in to comment.