store CLI defaults into variables

This commit is contained in:
2020-03-28 15:22:34 -05:00
parent 676eabb0cb
commit 67cd97e2d8
5 changed files with 48 additions and 34 deletions

View File

@ -26,6 +26,18 @@ type Command struct {
var commandRegistry = make(map[string]Command)
var (
defaultSelector string = "all"
defaultDuration float64 = 1.0
defaultPower string = ""
defaultColor string = ""
defaultBrightness string = ""
defaultInfrared string = ""
defaultFast bool = false
defaultWhiteKelvin string = ""
defaultWhiteName string = ""
)
func (f Flags) String(name string) string {
return f.FlagSet.Lookup(name).Value.String()
}