Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InfoCmd = &cobra.Command{ Use: "info [name]", Short: "print details of a specific chat plugin", Long: infoLong, Run: func(cmd *cobra.Command, args []string) { ga.SendCommandPath(cmd.CommandPath()) var err error if 0 >= len(args) { fmt.Println("missing required argument: 'name'") cmd.Usage() os.Exit(1) } var name string if 0 < len(args) { name = args[0] } var entrypoints []string if 1 < len(args) { entrypoints = args[1:] } err = InfoRun(name, entrypoints) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "print available chat plugins in the current module", Long: listLong, Run: func(cmd *cobra.Command, args []string) { ga.SendCommandPath(cmd.CommandPath()) var err error err = ListRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var WithCmd = &cobra.Command{ Use: "with [name]", Short: "chat with a plugin in the current module", Long: withLong, Run: func(cmd *cobra.Command, args []string) { ga.SendCommandPath(cmd.CommandPath()) var err error if 0 >= len(args) { fmt.Println("missing required argument: 'name'") cmd.Usage() os.Exit(1) } var name string if 0 < len(args) { name = args[0] } var entrypoints []string if 1 < len(args) { entrypoints = args[1:] } err = WithRun(name, entrypoints) if err != nil { fmt.Println(err) os.Exit(1) } }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.