extensions

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

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

func NewCobraCmdWithDefaults() *cobra.Command

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) Run

func (o *CmdOptions) Run(ctx context.Context) error

func (*CmdOptions) Validate

func (o *CmdOptions) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL