cmd

package
v0.0.63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRootCommand

func CreateRootCommand(version string, buildDate string) *cobra.Command

CreateRootCommand used to run only root command without config.

func ErrorHandler added in v0.0.62

func ErrorHandler(w io.Writer, styles fang.Styles, err error)

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

func InitCompletionCmd(rootCmd *cobra.Command, cfg *config.Config) func(cfg *config.Config)

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

func InitSelfCmd(rootCmd *cobra.Command, version string, appSettings settings.Settings)

InitSelfCmd intializes root 'self' subcommand.

func InitSubCommands

func InitSubCommands(rootCmd *cobra.Command, conf *config.Config, showAll bool, out io.Writer)

initialize all commands dynamically from config.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL