From d3c6c1c39267b084ae51cb491fc4c8f47307e0aa Mon Sep 17 00:00:00 2001 From: hoorayman Date: Sun, 29 Mar 2026 17:05:27 +0800 Subject: [PATCH] fix: Fix 32-bit platform compilation issue by using platform-dependent max integer value instead of math.MaxInt64 --- service/drive/v1/api_ext.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 {