text

package
v10.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CyanCode = "\x1b[36m"

	ResetCode = "\x1b[0m"
)

Variables

View Source
var UseColor = true

UseColor determines if package will emit colors

Functions

func Blue added in v10.0.3

func Blue(in string) string

func Bold added in v10.0.3

func Bold(in string) string

func ColorHash

func ColorHash(name string) (output string)

ColorHash Colors text using a hashing algorithm. The same text will always produce the same color while different text will produce a different color.

func ContinueTask added in v10.0.3

func ContinueTask(s string, cont, noConfirm bool) bool

ContinueTask prompts if user wants to continue task. If NoConfirm is set the action will continue without user input.

func Cyan added in v10.0.3

func Cyan(in string) string

func Error

func Error(a ...interface{})

func Errorln

func Errorln(a ...interface{})

func FormatTime added in v10.0.2

func FormatTime(i int) string

Formats a unix timestamp to ISO 8601 date (yyyy-mm-dd)

func FormatTimeQuery added in v10.0.2

func FormatTimeQuery(i int) string

Formats a unix timestamp to ISO 8601 date (Mon 02 Jan 2006 03:04:05 PM MST)

func Green added in v10.1.0

func Green(in string) string

func Human added in v10.0.2

func Human(size int64) string

Human method returns results in human readable format.

func Info

func Info(a ...interface{})

func Infoln

func Infoln(a ...interface{})

func LessRunes added in v10.0.3

func LessRunes(iRunes, jRunes []rune) bool

LessRunes compares two rune values, and returns true if the first argument is lexicographicaly smaller.

func Magenta added in v10.0.3

func Magenta(in string) string

func OperationInfo

func OperationInfo(a ...interface{})

func OperationInfoln

func OperationInfoln(a ...interface{})

func PrintInfoValue

func PrintInfoValue(key string, values ...string)

func Red added in v10.0.3

func Red(in string) string

func SplitDBFromName added in v10.0.3

func SplitDBFromName(pkg string) (db, name string)

SplitDBFromName split apart db/package to db and package

func SprintError added in v10.0.3

func SprintError(a ...interface{}) string

func SprintOperationInfo added in v10.0.3

func SprintOperationInfo(a ...interface{}) string

func SprintWarn added in v10.0.3

func SprintWarn(a ...interface{}) string

func TestLessRunes added in v10.0.4

func TestLessRunes(t *testing.T)

func Warn

func Warn(a ...interface{})

func Warnln

func Warnln(a ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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