Documentation ¶
Index ¶
Constants ¶
View Source
const ( OutputYAML = "yaml" OutputJSON = "json" OutputJSONPP = "jsonpp" OutputShort = "short" )
Variables ¶
View Source
var ValidOutputFormats = []string{ OutputJSON, OutputYAML, OutputJSONPP, }
Functions ¶
func NewCobraCmd ¶
func NewCobraCmd(opts *CmdOptions) *cobra.Command
func NewCobraCmdWithDefaults ¶
Types ¶
type CmdOptions ¶
type CmdOptions struct { Short bool OutputFormat string ValidOutputFormats []string // contains filtered or unexported fields }
func NewDefaultCmdOptions ¶
func NewDefaultCmdOptions() *CmdOptions
func (*CmdOptions) Complete ¶
func (o *CmdOptions) Complete(cmd *cobra.Command, args []string) error
func (*CmdOptions) Validate ¶
func (o *CmdOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.