use registry for interfaces also

add list interfaces command
This commit is contained in:
Robin Olsen
2026-02-22 22:58:04 +01:00
parent 78769396e7
commit 235b07f7ce
5 changed files with 76 additions and 29 deletions

View File

@@ -25,7 +25,7 @@ func runStartCmd(cmd *cobra.Command, args []string) error {
if cmd.Flags().Changed("interface") {
if _, ok := interfaces[surveyCmd.InterfaceType]; !ok {
return fmt.Errorf("invalid interface, valid are (tui, repl, web)")
return fmt.Errorf("invalid interface, valid are %v", task.ListInterfaces())
}
interfaces = map[string]task.Interface{
surveyCmd.InterfaceType: interfaces[surveyCmd.InterfaceType],