Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoArgs cli.BeforeFunc = func(ctx *cli.Context) error { if ctx.NArg() > 0 && ctx.App.Command(ctx.Args()[0]) == nil { cmdName := ctx.Command.Name if cmdName == "" && ctx.App.Name != "" { cmdName = ctx.App.Name } return fmt.Errorf("unknown command %q for %q", ctx.Args()[0], cmdName) } return nil }
Functions ¶
func WithBeforeFns ¶
func WithBeforeFns(fns ...cli.BeforeFunc) cli.BeforeFunc
WithBeforeFns returns a cli.BeforeFunc that calls each of the provided functions in order. NOTE: The first function to return an error will end execution and be returned as the error value of the composed function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.