davecgh / go-spew

Implements a deep pretty printer for Go data structures to aid in debugging
ISC License
6.1k stars 367 forks source link

error spew.Dump bug #148

Open icetech233 opened 5 months ago

icetech233 commented 5 months ago

define

var gloMap map[string]uintptr

but

spew.Dump("gloMap", gloMap)
(string) (len=6) "gloMap"
(map[string]uintptr) (len=2) {
 (string) (len=14) "desktop_handle": (uintptr) 0x10010,
 (string) (len=11) "collect_win": (uintptr) <nil>
}

 (string) (len=11) "collect_win": (uintptr) <nil>
 (string) (len=11) "collect_win": (uintptr) <nil>
 (string) (len=11) "collect_win": (uintptr) <nil>

was wrong

icetech233 commented 5 months ago

correct is

icetech233 commented 5 months ago

(map[string]uintptr) (len=2) { (string) (len=14) "desktop_handle": (uintptr) 0x10010, (string) (len=11) "collect_win": (uintptr) 0 }