davecgh / go-spew

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

error spew.Dump bug #148

Open icetech233 opened 1 week ago

icetech233 commented 1 week 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 1 week ago

correct is

icetech233 commented 1 week ago

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