Documentation
¶
Index ¶
- func AskConfirmation(label string, args ...interface{}) (answeredYes bool, wasAnswered bool)
- func CopyFile(inPath, outPath string)
- func Dedent(input string) string
- func Description(value string) description
- func Ensure(condition bool, message string, args ...interface{})
- func Example(value string) example
- func ExamplePrefixed(prefix string, examples string) example
- func Execute(f func(cmd *cobra.Command, args []string) error) execute
- func FileExists(path string) bool
- func NoError(err error, message string, args ...interface{})
- func Quit(message string, args ...interface{})
- func Root(usage, short string, opts ...CommandOption) *cobra.Command
- func Run(usage, short string, opts ...CommandOption)
- type Args
- type BeforeAllHook
- type CommandOption
- type CommandOptionFunc
- type Flags
- type PersistentFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
func Description ¶
func Description(value string) description
func ExamplePrefixed ¶
func FileExists ¶
func Run ¶
func Run(usage, short string, opts ...CommandOption)
Types ¶
type Args ¶
type Args cobra.PositionalArgs
func ExactValidArgs ¶
ExactValidArgs returns an error if there are not exactly N positional args OR there are any positional args that are not in the `ValidArgs` field of `Command`
func MaximumNArgs ¶
MaximumNArgs returns an error if there are more than N args.
func MinimumNArgs ¶
MinimumNArgs returns an error if there is not at least N args.
type BeforeAllHook ¶
type CommandOption ¶
type CommandOption interface {
// contains filtered or unexported methods
}
func Command ¶
func Command(execute func(cmd *cobra.Command, args []string) error, usage, short string, opts ...CommandOption) CommandOption
func Group ¶
func Group(usage, short string, opts ...CommandOption) CommandOption
type CommandOptionFunc ¶
type PersistentFlags ¶
Click to show internal directories.
Click to hide internal directories.