summaryrefslogtreecommitdiff
path: root/spew/config.go
diff options
context:
space:
mode:
authorPatrick Mezard <[email protected]>2013-10-28 14:35:33 +0100
committerPatrick Mezard <[email protected]>2013-10-28 14:35:33 +0100
commit8e1b34364faac53e7da8801da5baf0c0df120a42 (patch)
tree88f873e88a3782c3f821c3f502611025c5bb7ba4 /spew/config.go
parent1fdf49f1b9ce7ab182b1b38bbc847b9807f66f3a (diff)
dump: make SortKeys default to string representation instead of nothing
The previous version of SortKeys was sorting only native types. Now, if the type is unknown it defaults to its reflect.Value.String() representation which at least guarantees display stability.
Diffstat (limited to 'spew/config.go')
-rw-r--r--spew/config.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/spew/config.go b/spew/config.go
index 1faca1b..d766dfb 100644
--- a/spew/config.go
+++ b/spew/config.go
@@ -77,7 +77,8 @@ type ConfigState struct {
// SortKeys specifies map keys should be sorted before being printed. Use
// this to have a more deterministic, diffable output. Note that only
// native types (bool, int, uint, floats, uintptr and string) are supported,
- // other key sequences will displayed in the original order.
+ // other types will be sort according to the reflect.Value.String() output
+ // which guarantees display stability.
SortKeys bool
}