Skip to content

Commit

Permalink
chore: use a more generic name for max limit
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Aug 26, 2024
1 parent 2e83d6b commit dafdb24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions internal/fs/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/flanksource/commons/utils"
"github.com/flanksource/duty/connection"
"github.com/flanksource/duty/context"
"github.com/samber/lo"
)

// s3FS implements
Expand Down Expand Up @@ -51,8 +52,8 @@ func NewS3FS(ctx context.Context, bucket string, conn connection.S3Connection) (
return client, nil
}

func (t *s3FS) SetMaxList(maxList int32) {
t.maxList = &maxList
func (t *s3FS) SetPageSize(maxList int) {
t.maxList = lo.ToPtr(int32(maxList))
}

func (t *s3FS) Close() error {
Expand Down
2 changes: 1 addition & 1 deletion internal/fs/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestS3Glob(t *testing.T) {
if err != nil {
t.Fatal(err)
}
fs.SetMaxList(2) // Test pagination
fs.SetPageSize(2) // Test pagination

// json/
// └── flanksource/
Expand Down

0 comments on commit dafdb24

Please sign in to comment.