worker

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnmatchedCommand means Unmatched command found. It's just a state, not a real error, see [cli.Config.UnmatchedAsError]
	ErrUnmatchedCommand = errorsv3.New("UNKNOWN Command FOUND: %q | cmd=%v")
	// ErrUnmatchedFlag means Unmatched flag found. It's just a state, not a real error, see [cli.Config.UnmatchedAsError]
	ErrUnmatchedFlag = errorsv3.New("UNKNOWN Flag FOUND: %q | cmd=%v")
	// ErrRequiredFlag means required flag must be set explicitly
	ErrRequiredFlag = errorsv3.New("Flag %q is REQUIRED | cmd=%v")
)
View Source
var (
	CurrentTitleColor     = color.FgDefault
	CurrentFlagTitleColor = color.FgGreen

	// CurrentHiddenColor the print color for left part of a hidden opt
	CurrentHiddenColor = color.FgDarkGray

	// CurrentDeprecatedColor the print color for deprecated opt line
	CurrentDeprecatedColor = color.FgDarkGray

	// CurrentDescColor the print color for description line
	CurrentDescColor = color.FgDarkGray
	// CurrentDefaultValueColor the print color for default value line
	CurrentDefaultValueColor = color.FgCyan
	// CurrentGroupTitleColor the print color for titles
	CurrentGroupTitleColor   = color.FgWhite
	CurrentGroupTitleBgColor = color.BgDim
)

Functions

func New

func New(c *cli.Config, opts ...wOpt) *workerS

func SetUniqueWorker

func SetUniqueWorker(s cli.Runner)

func UniqueWorker

func UniqueWorker() cli.Runner

func WithConfig

func WithConfig(c *cli.Config) wOpt

func WithHelpScreenSets

func WithHelpScreenSets(showHelpScreen, showHitStates bool) wOpt

Types

type HelpWriter

type HelpWriter interface {
	io.Writer
	io.StringWriter
}

Jump to

Keyboard shortcuts

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