INNER CODE UNIT · Go

newCLICallCommand

ktr0731/evans · app/cli_commands.go:12

func newCLICallCommand(flags *flags, ui cui.UI) *cobra.Command {
	var (
		out          string
		enrich       bool
		emitDefaults bool
	)
	cmd := &cobra.Command{
		Use:     "call [options ...] <method>",
		Aliases: []string{"c"},
		Short:   "call a method",
		Long:    `call invokes a method based on the passed method name.`,
		Example: strings.Join([]string{
			"        $ echo '{}' | evans -r cli call api.Service.Unary # call Unary method with an empty message",
			"        $ evans -r cli call -f in.json api.Service.Unary  # call Unary method with an input file",
			"",
			"        $ evans -r cli call -f in.json --enrich --output json api.Service.Unary # enrich output with JSON format",
		}, "\n"),
		RunE: runFunc(flags, func(cmd *cobra.Command, cfg *mergedConfig) error {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…