Open chenzhuoyu opened 2 years ago
A workaround is: func main() { spew.Dump(&X{1: 2}) }
A workaround is: func main() { spew.Dump(&X{1: 2}) }
Not really. Sometimes the map is not directly accessable, and maybe nested in a deep structure.
I've fixed this issue in my fork of the package: https://github.com/spewerspew/spew/commit/62a6506637ab035cd8626d40cf3d7f74d8dcd4d6
Dupe of #115
Repro:
Output:
Panic occures when taking the
len()
of the receiverx
, which is an invalid pointer.This happens on all versions of go I installed (1.16 to 1.18).