Documentation
¶
Overview ¶
Package styledprinter helps to do some pretty-printing of text in terminal using ANSI escape sequences
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OutputStyle ¶
type OutputStyle struct {
// contains filtered or unexported fields
}
OutputStyle is a structure that can add ANSI codes on a string from a legible style string.
func NewOutputStyle ¶
func NewOutputStyle(styleString string) *OutputStyle
NewOutputStyle instanciates an OutputStyle struct from a style string.
func (OutputStyle) Apply ¶
func (s OutputStyle) Apply(text string) string
Apply surrounds a given string with the adequate ANSI escape sequence.
Click to show internal directories.
Click to hide internal directories.