Documentation
¶
Index ¶
- Constants
- Variables
- func Add(parent *cobra.Command, builder ...CommandBuilder)
- func Confirm(message string) bool
- func ConfirmDeletion(kind string, item fmt.Stringer) bool
- func FormatAndIndent(text string, indent int) string
- func FormatExamples(examples string) string
- func FormatHelp(help string) string
- func Print(out console.Writer, val interface{}) error
- func PrintStdout(val interface{}) error
- func Run()
- type CommandBuilder
Constants ¶
View Source
const ( FlagEndpoint = "endpoint" FlagToken = "token" FlagDump = "dump" FlagDryRun = "dry-run" FlagFormat = "format" )
View Source
const ( FormatJSON = "json" FormatTable = "table" FormatCSV = "csv" )
Variables ¶
View Source
var ( Name = build.Name Version = "dev" DefaultEndpoint = build.DefaultEndpoint )
View Source
var ( Stdout = console.NewConsoleOutput(os.Stdout) Stderr = console.NewConsoleOutput(os.Stderr) )
View Source
var Config config
View Source
var Root = cobra.Command{ Use: Name, Short: build.Description, Version: Version, SilenceErrors: true, }
Functions ¶
func Add ¶
func Add(parent *cobra.Command, builder ...CommandBuilder)
func FormatAndIndent ¶
func FormatExamples ¶
func FormatHelp ¶
func PrintStdout ¶
func PrintStdout(val interface{}) error
Types ¶
type CommandBuilder ¶
Click to show internal directories.
Click to hide internal directories.