Documentation
¶
Index ¶
- Constants
- Variables
- func ColorBlue(s string) string
- func ColorCyan(s string) string
- func ColorGreen(s string) string
- func ColorMagenta(s string) string
- func ColorRed(s string) string
- func ColorYellow(s string) string
- func Eprint(args ...any) (int, error)
- func Eprintf(format string, args ...any) (int, error)
- func Eprintln(args ...any) (int, error)
- func GetSize() (int, int, error)
- func IndentString(indent int) string
- func Options(options []string) string
- func Print(args ...any) (int, error)
- func PrintIndent(indent int)
- func Printf(format string, args ...any) (int, error)
- func Println(args ...any) (int, error)
- func StylizedOptions(options []string, colorizer Colorizer) string
- type Cleanup
- type Colorizer
- type Stylist
- type Table
- type TableStyle
- type TreePrefix
Constants ¶
View Source
const ( ResetCode = escapePrefix + "0" + escapeSuffix RedCode = escapePrefix + "31" + escapeSuffix GreenCode = escapePrefix + "32" + escapeSuffix YellowCode = escapePrefix + "33" + escapeSuffix BlueCode = escapePrefix + "34" + escapeSuffix MagentaCode = escapePrefix + "35" + escapeSuffix CyanCode = escapePrefix + "36" + escapeSuffix )
View Source
const ( TopSeparatorTableStyle = 1 << iota ColumnSeparatorTableStyle RowSeparatorTableStyle BottomSeparatorTableStyle )
View Source
const IndentSpaces = 2
Variables ¶
View Source
var Colorize = false
View Source
var DefaultStylist = NewStylist(false)
View Source
var Indent = strings.Repeat(" ", IndentSpaces)
View Source
var Quiet bool = false
Functions ¶
func IndentString ¶
func PrintIndent ¶
func PrintIndent(indent int)
func StylizedOptions ¶ added in v0.1.24
Types ¶
type Cleanup ¶ added in v0.1.62
type Cleanup func() error
func EnableColor ¶
func ProcessColorizeFlag ¶
type Stylist ¶ added in v0.1.24
type Stylist struct {
Colorize bool
}
func NewStylist ¶ added in v0.1.24
type Table ¶
type Table struct { Rows [][][]string Style TableStyle MaxWidth int HeadingSeparator string RowSeparator string TopDividerSeparator string TopDivider string MiddleDividerSeparator string MiddleDivider string BottomDividerSeparator string BottomDivider string }
func (*Table) ColumnWidths ¶
type TableStyle ¶
type TableStyle uint8
type TreePrefix ¶
type TreePrefix []bool
func (TreePrefix) Print ¶
func (self TreePrefix) Print(indent int, last bool)
Click to show internal directories.
Click to hide internal directories.