INNER CODE UNIT · Go

newREPLCommand

ktr0731/evans · app/commands.go:240

func newREPLCommand(flags *flags, ui cui.UI) *cobra.Command {
	cmd := &cobra.Command{
		Use:   "repl [options ...]",
		Short: "REPL mode",
		RunE: runFunc(flags, func(_ *cobra.Command, cfg *mergedConfig) error {
			if cfg.REPL.ColoredOutput {
				ui = cui.NewColored(ui)
			}
			return runREPLCommand(cfg, ui)
		}),
		SilenceErrors: true,
		SilenceUsage:  true,
	}
	initFlagSet(cmd.Flags(), ui.Writer())
	cmd.SetHelpFunc(usageFunc(ui.Writer(), []string{"package", "service"}))
	return cmd
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…