Skip to content

Commit

Permalink
fix: rename list flag instead
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Jan 6, 2025
1 parent 5484b97 commit 4ec4889
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ var ioFlags = []cli.Flag{
Usage: "Force requests to be 'host' for host-style or 'path' for path-style lookup. Default will attempt autodetect based on remote host name.",
},
cli.StringSliceFlag{
Name: "metadata",
Usage: "Add user metada to all objects using the format <key>=<value>. Random value can be set with 'rand:%length'. Can be used multiple times. Example: --metadata foo=bar --metadata randomValue=rand:1024.",
Name: "add-metadata",
Usage: "Add user metadata to all objects using the format <key>=<value>. Random value can be set with 'rand:%length'. Can be used multiple times. Example: --metadata foo=bar --metadata randomValue=rand:1024.",
Hidden: true,
},
cli.StringSliceFlag{
Expand Down
4 changes: 2 additions & 2 deletions cli/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var listFlags = []cli.Flag{
Usage: "Size of each generated object. Can be a number or 10KB/MB/GB. All sizes are base 2 binary.",
},
cli.BoolFlag{
Name: "extended-metadata",
Name: "metadata",
Usage: "Enable extended MinIO ListObjects with metadata, by default this benchmarking uses ListObjectsV2 API.",
},
}
Expand Down Expand Up @@ -72,7 +72,7 @@ func mainList(ctx *cli.Context) error {
b := bench.List{
Common: getCommon(ctx, newGenSource(ctx, "obj.size")),
Versions: ctx.Int("versions"),
Metadata: ctx.Bool("extended-metadata"),
Metadata: ctx.Bool("metadata"),
CreateObjects: ctx.Int("objects"),
NoPrefix: ctx.Bool("noprefix"),
}
Expand Down
2 changes: 1 addition & 1 deletion cli/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func putOpts(ctx *cli.Context) minio.PutObjectOptions {
PartSize: pSize,
}

for _, flag := range []string{"metadata", "tag"} {
for _, flag := range []string{"add-metadata", "tag"} {
values := make(map[string]string)

for _, v := range ctx.StringSlice(flag) {
Expand Down

0 comments on commit 4ec4889

Please sign in to comment.