✅ Update test for pagination

This commit is contained in:
OpenWaygate committed 2025-09-14 16:00:27 +08:00
1 parent 5dff86e13d
commit 5bf60ff2f1
26 files changed
+84 -26

No files matched your search

+4 -1
View File
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"io"
"math"
"github.com/eat-pray-ai/yutu/pkg"
"github.com/eat-pray-ai/yutu/pkg/auth"
@@ -190,8 +191,10 @@ func WithIDs(ids []string) Option {
func WithMaxResults(maxResults int64) Option {
return func(c *commentThread) {
if maxResults <= 0 {
if maxResults < 0 {
maxResults = 1
} else if maxResults == 0 {
maxResults = math.MaxInt64
}
c.MaxResults = maxResults
}