text

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PadRight

func PadRight(s string, width int) string

PadRight pads s with spaces on the right to reach width.

func Pluralize

func Pluralize(n int, singular, plural string) string

Pluralize returns singular when n == 1, otherwise plural.

func RelativeTime

func RelativeTime(t time.Time) string

RelativeTime returns a human-readable description of how long ago t was.

func Truncate

func Truncate(s string, max int) string

Truncate shortens s to max runes, appending "…" if truncated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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