Configure: list valid categories on error
This commit is contained in:
parent
65892ec257
commit
9cb40c68be
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ import (
|
|||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/evcc-io/evcc/util/templates"
|
||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||
"golang.org/x/exp/maps"
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
|
@ -97,7 +98,7 @@ func (c *CmdConfigure) Run(log *util.Logger, flagLang string, advancedMode, expa
|
|||
}
|
||||
}
|
||||
|
||||
panic("invalid category: " + category)
|
||||
log.FATAL.Fatalln("invalid category:", category, "have:", maps.Keys(DeviceCategories))
|
||||
}
|
||||
|
||||
fmt.Println()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue