Documentation
¶
Overview ¶
Package term renders plain, readable terminal output: optional color, aligned columns, wrapped paragraphs and human units. Color is used only when the writer is a terminal and the environment does not opt out.
Index ¶
- Constants
- func Bytes(n int) string
- func DidYouMean(word string, candidates []string) string
- func Duration(d time.Duration) string
- func Pad(text string, width int) string
- func Plural(n int, word string) string
- func Suggest(word string, candidates []string) string
- func Wrap(text string, width int, indent string) string
- type Style
Constants ¶
View Source
const Width = 96
Width is the column count text is wrapped to.
Variables ¶
This section is empty.
Functions ¶
func DidYouMean ¶ added in v0.1.0
DidYouMean is " Did you mean x?" for a close candidate, else "".
Types ¶
type Style ¶
type Style struct{ Color bool }
Style renders text attributes as ANSI escapes, or not at all.
Click to show internal directories.
Click to hide internal directories.