Documentation
¶
Index ¶
- Constants
- Variables
- func ColorBlue(name string) string
- func ColorCyan(name string) string
- func ColorGreen(name string) string
- func ColorMagenta(name string) string
- func ColorRed(name string) string
- func ColorYellow(name string) string
- func EnableColor(force bool)
- func Eprint(args ...interface{}) (int, error)
- func Eprintf(format string, args ...interface{}) (int, error)
- func Eprintln(args ...interface{}) (int, error)
- func GetSize() (int, int, error)
- func IndentString(indent int) string
- func Options(options []string) string
- func Print(args ...interface{}) (int, error)
- func PrintIndent(indent int)
- func Printf(format string, args ...interface{}) (int, error)
- func Println(args ...interface{}) (int, error)
- func ProcessColorizeFlag(colorize string) error
- func StylizedOptions(options []string, colorizer Colorizer) string
- type Colorizer
- type Stylist
- type Table
- type TableStyle
- type TreePrefix
Constants ¶
View Source
const ( TopSeparatorTableStyle = 1 << iota ColumnSeparatorTableStyle RowSeparatorTableStyle BottomSeparatorTableStyle )
View Source
const IndentSpaces = 2
Variables ¶
View Source
var BlueCode = escapePrefix + color.FgBlue.String() + escapeSuffix
View Source
var Colorize = false
View Source
var CyanCode = escapePrefix + color.FgCyan.String() + escapeSuffix
View Source
var GreenCode = escapePrefix + color.FgGreen.String() + escapeSuffix
View Source
var Indent = strings.Repeat(" ", IndentSpaces)
View Source
var MagentaCode = escapePrefix + color.FgMagenta.String() + escapeSuffix
View Source
var Quiet bool = false
View Source
var RedCode = escapePrefix + color.FgRed.String() + escapeSuffix
View Source
var ResetCode = escapePrefix + color.Reset.String() + escapeSuffix
View Source
var Stderr io.Writer = os.Stderr
View Source
var Stdout io.Writer = os.Stdout
View Source
var Stylize = NewStylist(false)
View Source
var YellowCode = escapePrefix + color.FgYellow.String() + escapeSuffix
Functions ¶
func EnableColor ¶
func EnableColor(force bool)
func IndentString ¶
func PrintIndent ¶
func PrintIndent(indent int)
func ProcessColorizeFlag ¶
func StylizedOptions ¶ added in v0.1.24
Types ¶
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.