stringx

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package stringx provides string formatting and stringification primitives for CLI values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stringify

func Stringify(value any) string

Stringify converts any value into its canonical string representation, applying zero-allocation and reflection-free fast paths for string, boolean, numeric, and standard CLI types.

encoding.TextMarshaler takes precedence over fmt.Stringer, as in flag.TextVar and log/slog: MarshalText is the inverse of the UnmarshalText that coercion parses with, so the result parses back into the same value (time.Time renders as RFC 3339, not its String form). When MarshalText fails, a fmt.Stringer implementation is used instead. Both are checked for typed nil pointers before being called.

Types

This section is empty.

Jump to

Keyboard shortcuts

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