Allow disabling address of functions
flimzy opened this issue · comments
Jonathan Hall commented
Structs with function types output the function address, even with DisablePointerAddresses: true
. Perhaps that makes sense, since a function type isn't really a pointer. But it would be great to be able to disable these addresses. To reproduce:
package main
import (
"github.com/davecgh/go-spew/spew"
)
func main() {
cf := spew.ConfigState{
DisablePointerAddresses: true,
}
x := struct {
fn func()
}{
fn: func() {},
}
cf.Dump(x)
}
Which produces the following output:
(struct { fn func() }) {
fn: (func()) 0x4c0020
}