Documentation ¶
Overview ¶
Package value provides functionality for reflect.Value types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
func Format(v reflect.Value, conf FormatConfig) string
Format formats the value v as a string.
This is similar to fmt.Sprintf("%+v", v) except this:
- Prints the type unless it can be elided
- Avoids printing struct fields that are zero
- Prints a nil-slice as being nil, not empty
- Prints map entries in deterministic order
Types ¶
type FormatConfig ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.