From 21e29a6d3b84e66d967c07faec35ae34faaded4f Mon Sep 17 00:00:00 2001 From: sfomuseumbot Date: Fri, 20 Dec 2024 10:07:35 -0800 Subject: [PATCH] Check return value of yield func --- reader.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reader.go b/reader.go index 85a2dc0..6a1efc5 100644 --- a/reader.go +++ b/reader.go @@ -86,7 +86,9 @@ func (r Reader) Iterate() iter.Seq2[map[string]string, error] { break } - yield(dict, nil) + if !yield(dict, nil) { + return + } } } }