diff --git a/service/drive/v1/api_ext.go b/service/drive/v1/api_ext.go index 9e7bfed3..12a49c2f 100644 --- a/service/drive/v1/api_ext.go +++ b/service/drive/v1/api_ext.go @@ -16,18 +16,19 @@ import ( "context" "errors" "fmt" - "math" - "github.com/larksuite/oapi-sdk-go/v3/core" + larkcore "github.com/larksuite/oapi-sdk-go/v3/core" ) +const maxInt = int(^uint(0) >> 1) + func (f *file) ListByIterator(ctx context.Context, req *ListFileReq, options ...larkcore.RequestOptionFunc) (*ListFileIterator, error) { return &ListFileIterator{ ctx: ctx, req: req, listFunc: f.List, options: options, - limit: math.MaxInt64}, nil + limit: maxInt}, nil } type ListFileIterator struct {