summaryrefslogtreecommitdiff
path: root/spew
diff options
context:
space:
mode:
Diffstat (limited to 'spew')
-rw-r--r--spew/common.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/spew/common.go b/spew/common.go
index 945b0b0..6b8bfec 100644
--- a/spew/common.go
+++ b/spew/common.go
@@ -140,6 +140,9 @@ func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool)
}
viface = v.Addr().Interface()
} else {
+ if v.CanAddr() {
+ v = v.Addr()
+ }
viface = v.Interface()
}