// NewDescribeCommand creates a new command to view a connector
NewDescribeCommand creates a new command to view a connector
// NewDescribeCommand creates a new command to view a connector
func NewDescribeCommand(f *factory.Factory) *cobra.Command {
	opts := &options{
		f: f,
	}
	cmd := &cobra.Command{
		Use:     "describe",
		Short:   f.Localizer.MustLocalize("connector.describe.cmd.shortDescription"),
		Long:    f.Localizer.MustLocalize("connector.describe.cmd.longDescription"),
		Example: f.Localizer.MustLocalize("connector.describe.cmd.example"),
		Args:    cobra.NoArgs,
		RunE: func(cmd *cobra.Command, args []string) error {
			validOutputFormats := flagutil.ValidOutputFormats
			if opts.outputFormat != "" && !flagutil.IsValidInput(opts.outputFormat, validOutputFormats...) {
				return flagutil.InvalidValueError("output", opts.outputFormat, validOutputFormats...)
			}
			return runDescribe(opts)
		},
	}
	flags := connectorcmdutil.NewFlagSet(cmd, f)
	_ = flags.AddConnectorID(&opts.id).Required()
	flags.AddOutput(&opts.outputFormat)
	return cmd
}
func NewDescribeCommand ( f * factory . Factory ) * cobra . Command { opts := & options { f : f , } cmd := & cobra . Command { Use : " " , Short : f . Localizer . MustLocalize ( " " ) , Long : f . Localizer . MustLocalize ( " " ) , Example : f . Localizer . MustLocalize ( " " ) , Args : cobra . NoArgs , RunE : func ( cmd * cobra . Command , args [ ] string ) error { validOutputFormats := flagutil . ValidOutputFormats if opts . outputFormat != " " && ! flagutil . IsValidInput ( opts . outputFormat , validOutputFormats ... ) { return flagutil . InvalidValueError ( " " , opts . outputFormat , validOutputFormats ... ) } return runDescribe ( opts ) } , } flags := connectorcmdutil . NewFlagSet ( cmd , f ) _ = flags . AddConnectorID ( & opts . id ) . Required ( ) flags . AddOutput ( & opts . outputFormat ) return cmd }
NewDescribeCommand creates a new command to view a connector
NewDescribeCommand creates a new command to view a connector