support config state settings for pointer address printing in printf

This commit is contained in:
Zuwei Li 2018-09-21 12:35:51 +08:00
parent d8f796af33
commit f29cf96d6d
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ func (f *formatState) formatPtr(v reflect.Value) {
} }
// Display pointer information depending on flags. // 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) f.fs.Write(openParenBytes)
for i, addr := range pointerChain { for i, addr := range pointerChain {
if i > 0 { if i > 0 {