style

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Complete = color.GreenString
View Source
var Error = color.New(color.FgRed, color.Bold).SprintfFunc()
View Source
var Map = func(value map[string]string, prefix, separator string) string {
	result := ""

	var keys []string

	for key := range value {
		keys = append(keys, key)
	}

	sort.Strings(keys)

	for _, key := range keys {
		result += fmt.Sprintf("%s%s=%s%s", prefix, key, value[key], separator)
	}

	if color.Enabled() {
		return Key(strings.TrimSpace(result))
	}
	return "'" + strings.TrimSpace(result) + "'"
}
View Source
var ProgressBar = color.HiBlueString
View Source
var Step = func(format string, a ...interface{}) string {
	return color.CyanString("===> "+format, a...)
}
View Source
var Symbol = func(value string) string {
	if color.Enabled() {
		return Key(value)
	}
	return "'" + value + "'"
}
View Source
var SymbolF = func(format string, a ...interface{}) string {
	if color.Enabled() {
		return Key(format, a...)
	}
	return "'" + fmt.Sprintf(format, a...) + "'"
}
View Source
var Tip = color.New(color.FgGreen, color.Bold).SprintfFunc()
View Source
var Warn = color.New(color.FgYellow, color.Bold).SprintfFunc()

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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