Skip to content

Commit

Permalink
Support -oshort flag with extension checks (#7076)
Browse files Browse the repository at this point in the history
Fixes #7032

This PR adds the support for `-oshort` flag for the `viz`, `multicluster`
and `jaeger` extensions which used to fail previously with an invalid
error.

Signed-off-by: Sankalp Rangare <sankalprangare786@gmail.com>
  • Loading branch information
sankalp-r authored and adleong committed Oct 22, 2021
1 parent 2c02b52 commit 9b677f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions jaeger/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ func newCheckOptions() *checkOptions {
}

func (options *checkOptions) validate() error {
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput)
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput && options.output != healthcheck.ShortOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput, healthcheck.ShortOutput)
}
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions multicluster/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func newCheckOptions() *checkOptions {
}

func (options *checkOptions) validate() error {
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput)
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput && options.output != healthcheck.ShortOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput, healthcheck.ShortOutput)
}
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions viz/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func newCheckOptions() *checkOptions {
}

func (options *checkOptions) validate() error {
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput)
if options.output != healthcheck.TableOutput && options.output != healthcheck.JSONOutput && options.output != healthcheck.ShortOutput {
return fmt.Errorf("Invalid output type '%s'. Supported output types are: %s, %s, %s", options.output, healthcheck.JSONOutput, healthcheck.TableOutput, healthcheck.ShortOutput)
}
return nil
}
Expand Down

0 comments on commit 9b677f3

Please sign in to comment.