Documentation
¶
Index ¶
- Constants
- Variables
- func AggregateIntoLines(parts []string, maxWidth int) ([]string, error)
- func Help(options ...Options) kong.Option
- func NewPrettyPrinter(printOpts Options) kong.HelpPrinter
- func PrettyValueFormatter(formatter kong.HelpValueFormatter) kong.HelpValueFormatter
- func TruncateWithSuffix(line string, width int, suffix string) string
- func Visible(str string) string
- func VisibleLen(str string) int
- type Options
Constants ¶
View Source
const DefaultWidth = 80
DefaultWidth is the fallback width if it can not be automatically determined.
Variables ¶
View Source
var ColorCommand = color.New(color.FgCyan).SprintFunc()
View Source
var ColorDefault = color.New(color.FgMagenta).SprintFunc()
View Source
var ColorExample = color.New(color.FgYellow).SprintFunc()
TODO: Make these configurable
View Source
var ColorLow = color.HiBlackString
View Source
var ColorPlaceHolder = ColorDefault
View Source
var ColorRequired = color.New(color.FgRed).SprintFunc()
View Source
var ColorType = ColorExample
Functions ¶
func NewPrettyPrinter ¶ added in v0.2.0
func NewPrettyPrinter(printOpts Options) kong.HelpPrinter
func PrettyValueFormatter ¶
func PrettyValueFormatter(formatter kong.HelpValueFormatter) kong.HelpValueFormatter
func TruncateWithSuffix ¶ added in v0.2.0
func VisibleLen ¶
Calculates the length of a string only counting visible characters
Types ¶
Click to show internal directories.
Click to hide internal directories.