 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func GetColorDefault() *color.Color
- func GetColorError() *color.Color
- func GetColorHighlight() *color.Color
- func GetColorInfo() *color.Color
- func GetColorSecondary() *color.Color
- func GetColorSecondaryHighlight() *color.Color
- func GetColorSuccess() *color.Color
- func GetColorWarning() *color.Color
- type CLI
- func (c *CLI) Banner(title, tagLine string)
- func (c *CLI) Command(cmd string, params ...string)
- func (c *CLI) Error(err error, debug bool)
- func (c *CLI) Header(format string, a ...any) func()
- func (c *CLI) NewTable(columnHeaders ...any) table.Table
- func (c *CLI) Notice(scope string, highlight string, secondary ...string)
- func (c *CLI) Recover(debug bool)
- func (c *CLI) Tool(toolName string, k *kong.Context)
- func (c *CLI) WithHeader(format string, a []any, f func())
 
- type CLIOption
- type CLIOptionFunc
- type Coverage
- type CoveragePrinter
- type GoTestPrinter
Constants ¶
const ( IconRocket = "\U0001F680" IconHighVoltage = "\U000026A1" IconBackhandIndexPointingRight = "\U0001F449" IconRunner = "\U0001F3C3" IconCollision = "\U0001F4A5" )
Known icons.
Variables ¶
var ( // DefaultCLI is a default, shared instance of CLI. DefaultCLI = NewCLI() )
Functions ¶
func GetColorSecondaryHighlight ¶
GetColorSecondaryHighlight returns a color.
Types ¶
type CLI ¶
type CLI struct {
	// contains filtered or unexported fields
}
    CLI provides some utilities for printing messages in CLI tools.
func (*CLI) Header ¶
Header prints a header based on a nesting hierarchy. Always call the returned function to close the scope, for example by deferring it.
func (*CLI) WithHeader ¶
WithHeader calls Header and runs f() within its scope.
type CLIOptionFunc ¶
type CLIOptionFunc func(*CLI)
CLIOptionFunc describes a CLI option.
func CLIExit ¶
func CLIExit(exit func(code int)) CLIOptionFunc
CLIExit returns a CLI option that allows to provide an alternative implementation for "os.Exit".
func (CLIOptionFunc) Apply ¶
func (f CLIOptionFunc) Apply(c *CLI)
Apply implements the CLIOption interface.
type CoveragePrinter ¶
type CoveragePrinter interface {
	Print(coverage *Coverage)
}
    CoveragePrinter implements a printer for test coverage information.
func NewCoveragePrinter ¶
func NewCoveragePrinter() CoveragePrinter
NewCoveragePrinter initializes a new CoveragePrinter.
type GoTestPrinter ¶
type GoTestPrinter interface {
	PrintLine(line string)
	PrintDone()
}
    GoTestPrinter implements a printer for "go test" output.
func NewGoTestPrinter ¶
func NewGoTestPrinter() GoTestPrinter
NewGoTestPrinter initializes a new GoTestPrinter.