text

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulletList added in v0.12.0

func BulletList(header string, style lipgloss.Style, items []error) string

BulletList returns a bullet list of the given items.

func HumanizeBytes

func HumanizeBytes(bytes *uint64) string

HumanizeBytes returns a human-readable string for the given bytes. If the given pointer is nil, "N/A" is returned.

func Obfuscate added in v0.12.0

func Obfuscate(s string) string

Obfuscate returns a string with all but the first two and last four characters replaced by asterisks. The asterisks in the middle get shrunken to only a few characters.

func PrettyTime added in v0.12.0

func PrettyTime(t time.Time) string

PrettyTime returns a human-readable string for the given time.

func ValueOrNA

func ValueOrNA[T any](v *T) string

ValueOrNA returns the value of the given pointer or "N/A" if the pointer is nil.

func WarningsList added in v0.12.0

func WarningsList(items []error) string

WarningsList returns a bullet list of the given items.

Types

This section is empty.

Jump to

Keyboard shortcuts

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