davecgh / go-spew

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

Feature Request: Dump byte arrays and slices like hexdump -C does in unix #9

Closed davecgh closed 11 years ago

davecgh commented 11 years ago

The current implementation dumps each byte along with its type on a separate line. This documents my intention to modify the dump to output byte arrays and slices like hexdump -C.

([]byte) {
 00000000  11 12 13 14 15 16 17 18  19 1a 1b 1c 1d 1e 1f 20  |............... |
 00000010  21 22 23 24 25 26 27 28  29 2a 2b 2c 2d 2e 2f 30  |!"#$%&'()*+,-./0|
 00000020  31 32                                             |12|
}
davecgh commented 11 years ago

This feature, including new tests, documentation updates, an example, and an updated test coverage report has been implemented as of commit 9b87fb3e12f244b6e1d4575c39aeb2761deb5f61.