add short and long descriptions of the commands

This commit is contained in:
Ryan Cavicchioni 2020-08-07 22:09:40 -05:00
parent 617c2fccf9
commit 491870e247
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
6 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -18,6 +18,7 @@ func init() {
Func: LsCmd,
Flags: fs,
Use: "[--selector=<selector>",
Short: "List the lights",
})
}

View File

@ -43,6 +43,7 @@ func init() {
Func: SetColorCmd,
Flags: fs,
Use: "[--selector <selector>] [--power (on|off)] [--hue <hue>] [--saturation <saturation>] [--rgb <rbg>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--fast]",
Short: "Set the color",
})
}

View File

@ -36,6 +36,7 @@ func init() {
Func: SetStateCmd,
Flags: fs,
Use: "[--selector <selector>] [--power (on|off)] [--color <color>] [--brightness <brightness>] [--duration <sec>] [--infrared <infrared>] [--fast]",
Short: "Set various state attributes",
})
}

View File

@ -39,6 +39,7 @@ func init() {
Func: SetWhiteCmd,
Flags: fs,
Use: "[--selector <selector>] [--power (on|off)] [--kelvin <kelvin>] [--name <color>] [--brightness <brightness>] [--duration <sec>] [--infrared] [--fast]",
Short: "Set the white level",
})
}

View File

@ -19,6 +19,7 @@ func init() {
Func: ToggleCmd,
Flags: fs,
Use: "[--selector <selector>] [--duration <sec>]",
Short: "Toggle the power on/off",
})
}