Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringOrDie ¶
StringOrDie renders its input using ToMap, and returns a string containing the result. If rendering yields an error, calls t.Fatal.
func ToMap ¶
ToMap renders an input value of any type as a map. This is intended for logging human-readable data dumps in test logs, so it uses the `json` tags on struct fields: this makes it easy to exclude `"-"` values that are typically not interesting, respect omitempty, etc.
We also replace any []byte fields with a hash of their value. This is usually sufficient for test log purposes, and is a lot more readable than a big array of individual byte values like Go would normally stringify a byte slice.
Types ¶
This section is empty.