style

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_LINE_LENGTH = 80

Variables

View Source
var (
	TickMark   = "✔"
	BulletMark = "•"
	CrossMark  = "✖"
	DashMark   = "—"
)
View Source
var (
	TableStyle = table.Style{
		Box: table.BoxStyle{
			PaddingRight: "  ",
		},
		Format: table.FormatOptions{
			Header: text.FormatUpper,
		},
		Color: table.ColorOptions{
			Header: text.Colors{text.Bold},
		},
	}
	PositiveColors = text.Colors{text.FgGreen}
	NegativeColors = text.Colors{text.FgRed}
	WarningColors  = text.Colors{text.FgYellow}
	InfoColors     = text.Colors{text.FgHiBlue}
	DisabledColors = text.Colors{text.FgHiBlack}

	HighLevelRuntimeColors = text.Colors{text.FgMagenta}
	LowLevelRuntimeColors  = text.Colors{text.FgCyan}
)

Functions

func BoolStr

func BoolStr(b bool, s ...string) string

BoolStr returns a string representation of a boolean value.

func BreakLine

func BreakLine(s string, length int) string

Breaks a like if it's larger than certain length, by adding a new line in between. Always breaks at a word boundary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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