Skip to content

Commit

Permalink
use showAppAndExit() for pager help
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Oct 11, 2022
1 parent 2732263 commit 1160c21
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/batch-describe.go
Expand Up @@ -50,7 +50,7 @@ EXAMPLES:
// checkBatchDescribeSyntax - validate all the passed arguments
func checkBatchDescribeSyntax(ctx *cli.Context) {
if len(ctx.Args()) != 2 {
cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
showCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
}
}

Expand Down
3 changes: 2 additions & 1 deletion cmd/batch-generate.go
Expand Up @@ -50,7 +50,8 @@ EXAMPLES:
// checkBatchGenerateSyntax - validate all the passed arguments
func checkBatchGenerateSyntax(ctx *cli.Context) {
if len(ctx.Args()) != 2 {
cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code

showCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/batch-list.go
Expand Up @@ -120,7 +120,7 @@ func (c batchListMessage) JSON() string {
// checkBatchListSyntax - validate all the passed arguments
func checkBatchListSyntax(ctx *cli.Context) {
if len(ctx.Args()) != 1 {
cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
showCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/batch-start.go
Expand Up @@ -75,7 +75,7 @@ func (c batchStartMessage) JSON() string {
// checkBatchStartSyntax - validate all the passed arguments
func checkBatchStartSyntax(ctx *cli.Context) {
if len(ctx.Args()) != 2 {
cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
showCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/batch-status.go
Expand Up @@ -44,7 +44,7 @@ EXAMPLES:
// checkBatchStatusSyntax - validate all the passed arguments
func checkBatchStatusSyntax(ctx *cli.Context) {
if len(ctx.Args()) != 2 {
cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
showCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/support-perf.go
Expand Up @@ -240,7 +240,7 @@ func runPerfTests(ctx *cli.Context, aliasedURL string, perfType string) []PerfTe
case "net":
mainAdminSpeedTestNetperf(ctx, aliasedURL, resultCh)
default:
cli.ShowCommandHelpAndExit(ctx, "perf", 1) // last argument is exit code
showCommandHelpAndExit(ctx, "perf", 1) // last argument is exit code
}

if !globalJSON {
Expand Down

0 comments on commit 1160c21

Please sign in to comment.