Documentation
¶
Index ¶
- func FormatDuration(duration time.Duration) string
- func IsColorEnabled() bool
- func NewId() string
- func Parse[T any](s string) (T, error)
- func PascalToScreamingSnake(s string) string
- func PrettyJson(s []byte) (string, error)
- func Stringify(val any) (string, error)
- func ToDuration(s string) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
func IsColorEnabled ¶
func IsColorEnabled() bool
IsColorEnabled returns true only when color isn't disabled and we're on a TTY-ish terminal. (Simple heuristic: respect NO_COLOR and require a TERM that usually supports ANSI.)
func PascalToScreamingSnake ¶
func PrettyJson ¶
PrettyJson pretty indents your json string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.