summaryrefslogtreecommitdiff
path: root/spew/doc.go
diff options
context:
space:
mode:
authorDave Collins <[email protected]>2013-11-16 16:05:42 -0600
committerDave Collins <[email protected]>2013-11-16 16:05:42 -0600
commit550ce83cb97c69998c5bb509a8d52907d417b256 (patch)
tree12861d54cc05c1214e1479dc6e233015016b9c3f /spew/doc.go
parent92b7ef315aff940fca77446da2fab578c3cd7651 (diff)
Update README and doc.go with new SortKeys option.
Diffstat (limited to 'spew/doc.go')
-rw-r--r--spew/doc.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/spew/doc.go b/spew/doc.go
index 8f0df87..2a0fb60 100644
--- a/spew/doc.go
+++ b/spew/doc.go
@@ -95,6 +95,14 @@ The following configuration options are available:
Enables recursion into types after invoking error and Stringer interface
methods. Recursion after method invocation is disabled by default.
+ * 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 with other types sorted according to the
+ reflect.Value.String() output which guarantees display stability.
+ Natural map order is used by default.
+
Dump Usage
Simply call spew.Dump with a list of variables you want to dump: