Skip to content

Commit

Permalink
Check return value of yield func
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomuseumbot committed Dec 20, 2024
1 parent c109999 commit 21e29a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ func (r Reader) Iterate() iter.Seq2[map[string]string, error] {
break
}

yield(dict, nil)
if !yield(dict, nil) {
return
}
}
}
}

0 comments on commit 21e29a6

Please sign in to comment.