Skip to content

Commit 873ec40

Browse files
committed
fix(go): update browse iterators
1 parent 9454ede commit 873ec40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/go/search_helpers.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ func (c *APIClient) BrowseRules(
363363
)
364364
},
365365
func(response *SearchRulesResponse, err error) (bool, error) {
366-
return err != nil || (response != nil && response.NbHits < hitsPerPage), err
366+
return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err
367367
},
368368
opts...,
369369
)
@@ -409,7 +409,7 @@ func (c *APIClient) BrowseSynonyms(
409409
)
410410
},
411411
func(response *SearchSynonymsResponse, err error) (bool, error) {
412-
return err != nil || (response != nil && response.NbHits < hitsPerPage), err
412+
return err != nil || (response != nil && int32(len(response.Hits)) < hitsPerPage), err
413413
},
414414
opts...,
415415
)

0 commit comments

Comments
 (0)