Documentation
¶
Index ¶
- Constants
- Variables
- func FailSilently(cmd *cobra.Command) error
- func PrintCollection(cmd *cobra.Command, collection OutputCollection)
- func PrintErrors(cmd *cobra.Command, errs map[string]error)
- func PrintRow(cmd *cobra.Command, row OutputEntry)
- func RegisterFormatFlags(flags *pflag.FlagSet)
- type OutputCollection
- type OutputEntry
- type OutputHeader
Constants ¶
View Source
const ( FormatQuiet format = "quiet" FormatTable format = "table" FormatJSON format = "json" FormatJSONPretty format = "json-pretty" FlagQuiet = "quiet" FlagFormat = "format" None = "<none>" )
View Source
const (
WarningJQIsComplicated = "" /* 199-byte string literal not displayed */
)
Variables ¶
View Source
var ( BuildVersion = "" BuildTime = "" BuildGitHash = "" NoPrintButFailError = errors.New("this error should never be printed") )
Functions ¶
func FailSilently ¶
func PrintCollection ¶
func PrintCollection(cmd *cobra.Command, collection OutputCollection)
func PrintRow ¶
func PrintRow(cmd *cobra.Command, row OutputEntry)
func RegisterFormatFlags ¶
Types ¶
type OutputCollection ¶
type OutputCollection interface {
OutputHeader
Table() [][]string
Interface() interface{}
Len() int
}
type OutputEntry ¶
type OutputEntry interface {
OutputHeader
Fields() []string
Interface() interface{}
}
type OutputHeader ¶
type OutputHeader interface {
Header() []string
}
Click to show internal directories.
Click to hide internal directories.