commit | 56567a8bbe2bce8276b9c965774868b0ed3eef10 | [log] [tgz] |
---|---|---|
author | Jason McVetta <jason.mcvetta@gmail.com> | Fri Dec 21 19:09:13 2012 -0800 |
committer | Jason McVetta <jason.mcvetta@gmail.com> | Fri Dec 21 19:09:13 2012 -0800 |
tree | ad537b0d022259dceb258b5fd093e7f7ad5f983d | |
parent | 821b30f52f1af83de62fd3a4baf33c4b80b0e1e5 [diff] |
Update installation section of readme to reflect "go get" vs old "goinstall".
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.
$ go get github.com/kr/pretty
then
import "github.com/kr/pretty"