Skip to content

Commit

Permalink
Add verbose and JSON output to OC-Client monitor
Browse files Browse the repository at this point in the history
Signed-off-by: hwipl <33433250+hwipl@users.noreply.github.com>
  • Loading branch information
hwipl committed Aug 15, 2024
1 parent 4ca8475 commit ed1f13c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func setConfig(args []string) error {
statusCmd.BoolVar(&verbose, "verbose", verbose, "set verbose output")
statusCmd.BoolVar(&json, "json", json, "set json output")

// monitor subcommand
monitorCmd := flag.NewFlagSet("monitor", flag.ContinueOnError)
monitorCmd.BoolVar(&verbose, "verbose", verbose, "set verbose output")
monitorCmd.BoolVar(&json, "json", json, "set json output")

// define command line arguments
flags := flag.NewFlagSet(args[0], flag.ContinueOnError)
cfgFile := flags.String("config", "", "set config `file`")
Expand Down Expand Up @@ -130,6 +135,10 @@ func setConfig(args []string) error {
if err := statusCmd.Parse(args[2:]); err != nil {
return err
}
case "monitor":
if err := monitorCmd.Parse(args[2:]); err != nil {
return err
}
}

// set command
Expand Down

0 comments on commit ed1f13c

Please sign in to comment.