Make output format flags boolean

This commit is contained in:
2021-04-11 02:05:05 +00:00
parent baf7daa1bb
commit 05f445ddf2
9 changed files with 51 additions and 10 deletions

View File

@ -43,7 +43,10 @@ func BreatheCmd(ctx Context) (int, error) {
c := ctx.Client
breathe := lifx.NewBreathe()
selector := ctx.Flags.String("selector")
format := ctx.Flags.String("output-format")
format, err := getOutputFormatFromFlags(ctx.Flags)
if err != nil {
return ExitFailure, err
}
if format == "" && ctx.Config.OutputFormat != "" {
format = ctx.Config.OutputFormat