Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteChoices ¶
func CompleteChoices(choices ...string) cobra.CompletionFunc
func ContractHome ¶
ContractHome makes a path nicer and shorter by contracting $HOME to '~'. If the path looks like a placeholder (starts with '('), it returns "-".
TODO: Make it fully correct, strings module is not path-aware.
func EscapeYAMLScalar ¶
EscapeYAMLScalar returns a YAML scalar which unmarshals to the given string. The intended use case is to escape user-provided data when pretty-printing YAML using a tabwriter. In the typical case it returns `s` unmodified. The result should be escaped with \xff before passing to a tabwriter. See https://pkg.go.dev/text/tabwriter#pkg-constants.
Types ¶
type ColorMixin ¶
type ColorMixin struct {
Color string
UnicodeMixin
}
func (ColorMixin) GetEscapes ¶
func (mx ColorMixin) GetEscapes() *Escapes
type Escapes ¶
type UnicodeMixin ¶
type UnicodeMixin struct {
Unicode string
}
func (UnicodeMixin) GetEscapes ¶
func (ux UnicodeMixin) GetEscapes() *Escapes
Click to show internal directories.
Click to hide internal directories.