From 491870e2476c42194785cb84834056629832a4c3 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Fri, 7 Aug 2020 22:09:40 -0500 Subject: [PATCH] add short and long descriptions of the commands --- cmd/command.go | 2 ++ cmd/ls.go | 1 + cmd/setcolor.go | 1 + cmd/setstate.go | 1 + cmd/setwhite.go | 1 + cmd/toggle.go | 1 + 6 files changed, 7 insertions(+) diff --git a/cmd/command.go b/cmd/command.go index cf59b33..a24cec0 100644 --- a/cmd/command.go +++ b/cmd/command.go @@ -28,6 +28,8 @@ type Command struct { Func func(CmdArgs) (int, error) Flags *flag.FlagSet Use string + Short string + Long string } var commandRegistry = make(map[string]Command) diff --git a/cmd/ls.go b/cmd/ls.go index 2c7562e..495ecbc 100644 --- a/cmd/ls.go +++ b/cmd/ls.go @@ -18,6 +18,7 @@ func init() { Func: LsCmd, Flags: fs, Use: "[--selector=", + Short: "List the lights", }) } diff --git a/cmd/setcolor.go b/cmd/setcolor.go index 5f00732..96d5800 100644 --- a/cmd/setcolor.go +++ b/cmd/setcolor.go @@ -43,6 +43,7 @@ func init() { Func: SetColorCmd, Flags: fs, Use: "[--selector ] [--power (on|off)] [--hue ] [--saturation ] [--rgb ] [--name ] [--brightness ] [--duration ] [--fast]", + Short: "Set the color", }) } diff --git a/cmd/setstate.go b/cmd/setstate.go index 73d6833..7be8389 100644 --- a/cmd/setstate.go +++ b/cmd/setstate.go @@ -36,6 +36,7 @@ func init() { Func: SetStateCmd, Flags: fs, Use: "[--selector ] [--power (on|off)] [--color ] [--brightness ] [--duration ] [--infrared ] [--fast]", + Short: "Set various state attributes", }) } diff --git a/cmd/setwhite.go b/cmd/setwhite.go index 7226141..df6cc2e 100644 --- a/cmd/setwhite.go +++ b/cmd/setwhite.go @@ -39,6 +39,7 @@ func init() { Func: SetWhiteCmd, Flags: fs, Use: "[--selector ] [--power (on|off)] [--kelvin ] [--name ] [--brightness ] [--duration ] [--infrared] [--fast]", + Short: "Set the white level", }) } diff --git a/cmd/toggle.go b/cmd/toggle.go index c2d2e7f..0508e8e 100644 --- a/cmd/toggle.go +++ b/cmd/toggle.go @@ -19,6 +19,7 @@ func init() { Func: ToggleCmd, Flags: fs, Use: "[--selector ] [--duration ]", + Short: "Toggle the power on/off", }) }