Skip to content

Commit

Permalink
refactor: rename --size to --limit in paging args
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta committed Apr 4, 2024
1 parent cbdc7f0 commit d69409c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add managed object storage name to `show` and `list` command outputs.
- Add completions for managed object storages and allow using managed object storage name (in addition to its UUID) as a positional argument.
- Add paging flags (`--size` and `--page`) to `database`, `gateway`, `loadbalancer`, and `objectstorage` list commands
- Add paging flags (`--limit` and `--page`) to `database`, `gateway`, `loadbalancer`, and `objectstorage` list commands

## [3.6.0] - 2024-03-07

Expand Down
4 changes: 2 additions & 2 deletions internal/commands/database/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func TestDatabaseListTitleFallback(t *testing.T) {
page: request.Page{Size: 100, Number: 0},
},
{
name: "size and page args",
name: "limit and page args",
page: request.Page{Size: 18, Number: 19},
args: []string{"--size", "18", "--page", "19"},
args: []string{"--limit", "18", "--page", "19"},
},
} {
t.Run(test.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/paging/paging.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type PageParameters struct {
}

func (pp *PageParameters) ConfigureFlags(fs *pflag.FlagSet) {
fs.IntVar(&pp.size, "size", 100, "Number of entries to receive at most.")
fs.IntVar(&pp.size, "limit", 100, "Number of entries to receive at most.")
fs.IntVar(&pp.number, "page", 0, "Page number to calculate first item to receive. Page numbers start from `1`.")
}

Expand Down

0 comments on commit d69409c

Please sign in to comment.