Closed pentateu closed 5 years ago
PS: I could not find a way to fix that for the Fprint also.. This only works for the Dump functions, which is what is required in my case.
wrong branch :( .. deleting PR.
Created 105 instead --> https://github.com/davecgh/go-spew/pull/105
Added DisableFunctionTypePointerAddresses to config.
If true it will not print the address of a Func field.
Example: type someFuncType func(string) string type someStructType struct { funcField someFuncType }
before this PR this would print: (*spew_test.ptrFuncTester)({ funcField: (spew_test.someFuncType) 0x11a49b0 })
With this PR and DisableFunctionTypePointerAddresses = true it will print: (*spew_test.ptrFuncTester)({ funcField: (spew_test.someFuncType)
})
This is important for snapshot testing, which is my use case.
Cheers