What is Nostr?
Nicolas Martyanoff /
npub1dkg…54dt
2024-11-09 19:44:08

Nicolas Martyanoff on Nostr: I spend a lot of time debugging #Go code, and using fmt.Printf with %v does not cut ...

I spend a lot of time debugging #Go code, and using fmt.Printf with %v does not cut it. go-spew is way too verbose, so I wrote a pretty printing library. Doing it right is hard; there are a lot of cornercases and the reflect package is a minefield. But it works.

Import go.n16f.net/pp, call pp.Print and you're done.

Partial inline is a life saver, and it's only one of the many little trick I use to make it useful for debugging.

You may find it useful.

https://github.com/galdor/go-pp

Author Public Key
npub1dkg70vzk4vvfsc5cup9gkfu2tcrs5unysl7npfvegf78nkuswr5skh54dt