diff options
| author | Alexander Staubo <[email protected]> | 2016-10-28 13:58:48 -0400 |
|---|---|---|
| committer | Alexander Staubo <[email protected]> | 2016-10-28 13:58:48 -0400 |
| commit | 04cdfd42973bb9c8589fd6a731800cf222fde1a9 (patch) | |
| tree | 4ba146e17ec66bfd2858c788972ecaf45cf6e56d /spew/config.go | |
| parent | 6d212800a42e8ab5c146b8ace3490ee17e5225f9 (diff) | |
Adds new config options:
DisablePointerAddresses: Specifies whether to disable the printing of
pointer addresses.
DisableCapacities specifies whether to disable the printing of capacities
for arrays, slices, maps and channels.
These are useful when diffing data structures in tests. Printing pointers
and capacities would otherwise lead to false negatives.
Diffstat (limited to 'spew/config.go')
| -rw-r--r-- | spew/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spew/config.go b/spew/config.go index 5552827..9db83c6 100644 --- a/spew/config.go +++ b/spew/config.go @@ -67,6 +67,15 @@ type ConfigState struct { // Google App Engine or with the "safe" build tag specified. DisablePointerMethods bool + // DisablePointerAddresses specifies whether to disable the printing of + // pointer addresses. This is useful when diffing data structures in tests. + DisablePointerAddresses bool + + // DisableCapacities specifies whether to disable the printing of capacities + // for arrays, slices, maps and channels. This is useful when diffing + // data structures in tests. + DisableCapacities bool + // ContinueOnMethod specifies whether or not recursion should continue once // a custom error or Stringer interface is invoked. The default, false, // means it will print the results of invoking the custom error or Stringer |
