summaryrefslogtreecommitdiff
path: root/spew/format.go
diff options
context:
space:
mode:
Diffstat (limited to 'spew/format.go')
-rw-r--r--spew/format.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/spew/format.go b/spew/format.go
index 70785fa..fc57fda 100644
--- a/spew/format.go
+++ b/spew/format.go
@@ -302,6 +302,9 @@ func (f *formatState) format(v reflect.Value) {
f.fs.Write(maxShortBytes)
} else {
keys := v.MapKeys()
+ if f.cs.SortKeys {
+ SortValues(keys)
+ }
for i, key := range keys {
if i > 0 {
f.fs.Write(spaceBytes)