Skip to content

Commit

Permalink
fix: IterToStruct check error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rached Ben Ayed committed Dec 12, 2023
1 parent 3e7da09 commit 6c0b5f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gcloud/helpers/spanner/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func IterToStructs[T any](iter *spanner.RowIterator) ([]T, error) {
// You can use it to simplify your code when you know there is only one row in the iterator.
func IterToStruct[T any](iter *spanner.RowIterator) (result T, exist bool, err error) {
results, errIter := IterToStructs[T](iter)

if err != nil {
if errIter != nil {
return result, false, errIter
}

Expand Down

0 comments on commit 6c0b5f1

Please sign in to comment.