Documentation
¶
Index ¶
- func CreateRootCommand(version string, buildDate string) *cobra.Command
- func ErrorHandler(w io.Writer, styles fang.Styles, err error)
- func HelpRenderer(cmd *cobra.Command, ctx fang.HelpContext)
- func InitCompletionCmd(rootCmd *cobra.Command, cfg *config.Config) func(cfg *config.Config)
- func InitSelfCmd(rootCmd *cobra.Command, version string, appSettings settings.Settings)
- func InitSubCommands(rootCmd *cobra.Command, conf *config.Config, showAll bool, out io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRootCommand ¶
CreateRootCommand used to run only root command without config.
func ErrorHandler ¶ added in v0.0.62
ErrorHandler renders command execution errors using lets' Fang-based style.
func HelpRenderer ¶ added in v0.0.62
func HelpRenderer(cmd *cobra.Command, ctx fang.HelpContext)
HelpRenderer renders Cobra help using lets' Fang-based layout.
It coordinates the full output, for example:
USAGE lets build [<bin>] [--flags] COMMANDS test Run all tests OPTIONS --help, -h Show help
func InitCompletionCmd ¶
InitCompletionCmd intializes root 'completion' subcommand. config can be nil, so we adding more flags only when config is found. Returns reinit function which must be called when config is parsed.
func InitSelfCmd ¶
InitSelfCmd intializes root 'self' subcommand.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.