INNER CODE UNIT · Go
newCLICommand
ktr0731/evans · app/commands.go:189
func newCLICommand(flags *flags, ui cui.UI) *cobra.Command {
cmd := &cobra.Command{
Use: "cli",
Short: "CLI mode",
RunE: runFunc(flags, func(cmd *cobra.Command, cfg *mergedConfig) (err error) {
if cfg.REPL.ColoredOutput {
ui = cui.NewColored(ui)
}
defer func() {
if err == nil {
ui.Warn("evans: deprecated usage, please use sub-commands. see `evans -h` for more details.")
}
}()
// For backward-compatibility.
// If the method is specified by passing --call option, use it.
call := cfg.call