use showAppAndExit() for pager help (#4292)

This commit is contained in:
Harshavardhana
2022-10-12 09:39:40 -07:00
committed by GitHub
parent 27322636ae
commit 318569a861
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ 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
}
}
+1 -1
View File
@@ -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
}
}
+1 -1
View File
@@ -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
}
}
+1 -1
View File
@@ -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
}
}
+1 -1
View File
@@ -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 {