aboutsummaryrefslogtreecommitdiff
path: root/cmp/report_reflect.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2019-05-27 12:30:12 -0400
committerJoe Tsai <joetsai@digital-static.net>2019-05-27 09:30:12 -0700
commit917e382dab80060fd1f094402bfbb5137ec3c4ff (patch)
treea59eb016822aaae5ce56470024341019ee656af0 /cmp/report_reflect.go
parent6f77996f0c42f7b84e5a2b252227263f93432e9b (diff)
downloadgo-cmp-917e382dab80060fd1f094402bfbb5137ec3c4ff.tar.gz
Invoke String when formatting map keys (#142)
This reverts a change introduced in commit 2940eda701 where cmp stopped calling the String method when printing map keys. Fixes #141
Diffstat (limited to 'cmp/report_reflect.go')
-rw-r--r--cmp/report_reflect.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/cmp/report_reflect.go b/cmp/report_reflect.go
index 5521c60..2761b62 100644
--- a/cmp/report_reflect.go
+++ b/cmp/report_reflect.go
@@ -208,7 +208,6 @@ func (opts formatOptions) FormatValue(v reflect.Value, m visitedPointers) (out t
func formatMapKey(v reflect.Value) string {
var opts formatOptions
opts.TypeMode = elideType
- opts.AvoidStringer = true
opts.ShallowPointers = true
s := opts.FormatValue(v, visitedPointers{}).String()
return strings.TrimSpace(s)