From f29cf96d6d712e757ccb07a8ce7e5cb1fae81fc5 Mon Sep 17 00:00:00 2001
From: Zuwei Li
Date: Fri, 21 Sep 2018 12:35:51 +0800
Subject: [PATCH] support config state settings for pointer address printing in
printf
---
spew/format.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spew/format.go b/spew/format.go
index b04edb7..3e36380 100644
--- a/spew/format.go
+++ b/spew/format.go
@@ -169,7 +169,7 @@ func (f *formatState) formatPtr(v reflect.Value) {
}
// Display pointer information depending on flags.
- if f.fs.Flag('+') && (len(pointerChain) > 0) {
+ if f.fs.Flag('+') && !f.cs.DisablePointerAddresses && (len(pointerChain) > 0) {
f.fs.Write(openParenBytes)
for i, addr := range pointerChain {
if i > 0 {