diff --git a/cli/delete.go b/cli/delete.go index ba1cb97..a083922 100644 --- a/cli/delete.go +++ b/cli/delete.go @@ -49,12 +49,14 @@ var deleteFlags = []cli.Flag{ }, } +var DeletedCombinedFlags = combineFlags(globalFlags, ioFlags, deleteFlags, genFlags, benchFlags, analyzeFlags) + var deleteCmd = cli.Command{ Name: "delete", Usage: "benchmark delete objects", Action: mainDelete, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, deleteFlags, genFlags, benchFlags, analyzeFlags), + Flags: DeletedCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/get.go b/cli/get.go index f3ed85d..4256ba6 100644 --- a/cli/get.go +++ b/cli/get.go @@ -64,12 +64,14 @@ var getFlags = []cli.Flag{ }, } +var GetCombinedFlags = combineFlags(globalFlags, ioFlags, getFlags, genFlags, benchFlags, analyzeFlags) + var getCmd = cli.Command{ Name: "get", Usage: "benchmark get objects", Action: mainGet, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, getFlags, genFlags, benchFlags, analyzeFlags), + Flags: GetCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/list.go b/cli/list.go index 875f4eb..5341f4e 100644 --- a/cli/list.go +++ b/cli/list.go @@ -45,12 +45,14 @@ var listFlags = []cli.Flag{ }, } +var ListCombinedFlags = combineFlags(globalFlags, ioFlags, listFlags, genFlags, benchFlags, analyzeFlags) + var listCmd = cli.Command{ Name: "list", Usage: "benchmark list objects", Action: mainList, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, listFlags, genFlags, benchFlags, analyzeFlags), + Flags: ListCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/mixed.go b/cli/mixed.go index 0d082d5..237ac8a 100644 --- a/cli/mixed.go +++ b/cli/mixed.go @@ -60,12 +60,14 @@ var mixedFlags = []cli.Flag{ }, } +var MixedCombinedFlags = combineFlags(globalFlags, ioFlags, mixedFlags, genFlags, benchFlags, analyzeFlags) + var mixedCmd = cli.Command{ Name: "mixed", Usage: "benchmark mixed objects", Action: mainMixed, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, mixedFlags, genFlags, benchFlags, analyzeFlags), + Flags: MixedCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/multipart.go b/cli/multipart.go index 79a0d02..d8f8c55 100644 --- a/cli/multipart.go +++ b/cli/multipart.go @@ -56,13 +56,15 @@ var multipartFlags = []cli.Flag{ }, } -// Put command. +var MultiPartCombinedFlags = combineFlags(globalFlags, ioFlags, multipartFlags, genFlags, benchFlags, analyzeFlags) + +// MultiPart command. var multipartCmd = cli.Command{ Name: "multipart", Usage: "benchmark multipart object", Action: mainMultipart, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, multipartFlags, genFlags, benchFlags, analyzeFlags), + Flags: MultiPartCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} @@ -75,7 +77,7 @@ FLAGS: {{end}}`, } -// mainPut is the entry point for cp command. +// mainMultipart is the entry point for put command. func mainMultipart(ctx *cli.Context) error { checkMultipartSyntax(ctx) b := bench.Multipart{ @@ -96,7 +98,7 @@ func mainMultipart(ctx *cli.Context) error { return runBench(ctx, &b) } -// putOpts retrieves put options from the context. +// multipartOpts retrieves put options from the context. func multipartOpts(ctx *cli.Context) minio.PutObjectOptions { return minio.PutObjectOptions{ ServerSideEncryption: newSSE(ctx), diff --git a/cli/put.go b/cli/put.go index 5c6d791..9c907bb 100644 --- a/cli/put.go +++ b/cli/put.go @@ -42,13 +42,15 @@ var putFlags = []cli.Flag{ }, } +var PutCombinedFlags = combineFlags(globalFlags, ioFlags, putFlags, genFlags, benchFlags, analyzeFlags) + // Put command. var putCmd = cli.Command{ Name: "put", Usage: "benchmark put objects", Action: mainPut, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, putFlags, genFlags, benchFlags, analyzeFlags), + Flags: PutCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/retention.go b/cli/retention.go index f4b6246..9cea5c7 100644 --- a/cli/retention.go +++ b/cli/retention.go @@ -41,12 +41,14 @@ var retentionFlags = []cli.Flag{ }, } +var RetentionCombinedFlags = combineFlags(globalFlags, ioFlags, retentionFlags, genFlags, benchFlags, analyzeFlags) + var retentionCmd = cli.Command{ Name: "retention", Usage: "benchmark PutObjectRetention", Action: mainRetention, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, retentionFlags, genFlags, benchFlags, analyzeFlags), + Flags: RetentionCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/stat.go b/cli/stat.go index b8a383a..a0278d9 100644 --- a/cli/stat.go +++ b/cli/stat.go @@ -50,12 +50,14 @@ var statFlags = []cli.Flag{ }, } +var StatCombinedFlags = combineFlags(globalFlags, ioFlags, statFlags, genFlags, benchFlags, analyzeFlags) + var statCmd = cli.Command{ Name: "stat", Usage: "benchmark stat objects (get file info)", Action: mainStat, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, statFlags, genFlags, benchFlags, analyzeFlags), + Flags: StatCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} diff --git a/cli/versioned.go b/cli/versioned.go index 4869972..4cba3e4 100644 --- a/cli/versioned.go +++ b/cli/versioned.go @@ -60,12 +60,14 @@ var versionedFlags = []cli.Flag{ }, } +var VersionedCombinedFlags = combineFlags(globalFlags, ioFlags, versionedFlags, genFlags, benchFlags, analyzeFlags) + var versionedCmd = cli.Command{ Name: "versioned", Usage: "benchmark mixed versioned objects", Action: mainVersioned, Before: setGlobalsFromContext, - Flags: combineFlags(globalFlags, ioFlags, versionedFlags, genFlags, benchFlags, analyzeFlags), + Flags: VersionedCombinedFlags, CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}}