commit | a6f3cf47d962d7c6eae13b363e2b860eb561e528 | [log] [tgz] |
---|---|---|
author | Keith Rarick <kr@xph.us> | Sat Jun 11 16:37:40 2011 -0700 |
committer | Keith Rarick <kr@xph.us> | Sat Jun 11 16:37:40 2011 -0700 |
tree | 1c9571a6330ecb2d5d32bf4e40f99afbbc7ae5eb | |
parent | ac395b7fd2758fb0919d9f1b9051cee871953e93 [diff] |
remove dead code
Package pretty provides pretty-printing for go values. This is useful during debugging, to avoid wrapping long output lines in the terminal.
It provides a function, Formatter, that can be used with any function that accepts a format string. For example,
type LongTypeName struct { longFieldName, otherLongFieldName int } func TestFoo(t *testing.T) { var x []LongTypeName{{1, 2}, {3, 4}, {5, 6}} t.Errorf("%# v", Formatter(x)) }
This package also provides a convenience wrapper for each function in package fmt that takes a format string.
$ goinstall github.com/kr/pretty.go
then
import "github.com/kr/pretty.go"