INNER CODE UNIT · Go
newCLIDescribeCommand
ktr0731/evans · app/cli_commands.go:111
func newCLIDescribeCommand(flags *flags, ui cui.UI) *cobra.Command {
cmd := &cobra.Command{
Use: "desc [options ...] [symbol]",
Aliases: []string{"describe"},
Short: "describe the descriptor of a symbol",
Long: `desc shows the descriptor of the given symbol.
The symbol should be a fully-qualified name. If no symbol is passed, desc shows all descriptors of the loaded services.`,
Example: strings.Join([]string{
" $ evans -r cli desc # describe the descriptors of the loaded services",
` $ evans -r cli desc api.Service # describe the service descriptor of "api.Service"`,
` $ evans -r cli desc api.Request # describe the message descriptor of "api.Request"`,
}, "\n"),
RunE: runFunc(flags, func(cmd *cobra.Command, cfg *mergedConfig) error {
if cfg.REPL.ColoredOutput {
ui = cui.NewColored(ui)
}
var fqn string