color

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2016 License: AGPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlackOnWhite = color.New(color.FgBlack, color.BgHiWhite).SprintFunc()
	BlackOnCyan  = color.New(color.FgBlack, color.BgHiCyan).SprintFunc()
)

Functions

func Map

func Map(colorize func(...interface{}) string, strs []string) []string

Map returns a copy of the given []string with each contained string colorized with the 'colorize' function.

Example: fmt.Printf("%s", Map(BlackOnWhite, []string{"tag1", "tag2", "tag3"}))

func Print added in v0.4.4

func Print(a ...interface{})

func Printf added in v0.4.4

func Printf(format string, a ...interface{})

func Println added in v0.4.4

func Println(a ...interface{})

func Tags

func Tags(tags []string) string

Tags returns a colorized list of the given tags

func TextAndTags added in v0.5.1

func TextAndTags(text string, tags []string) string

func TextRow

func TextRow(r *types.Row) string

func TextRows

func TextRows(rows types.Rows) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL