x/debug: generalize map-reading code and move it from print.go to peek.go so it can be used elsewhere.

Change the printer to output maps in a similar format to fmt.Print.

Change-Id: Ie53d83fd769a3d0c175c3d67d89efc12ffe17826
Reviewed-on: https://go-review.googlesource.com/12349
Reviewed-by: Rob Pike <r@golang.org>
3 files changed