commit | dfe8fc0bebd2f8e7a37853ee6a9d6ceda53b988a | [log] [tgz] |
---|---|---|
author | Keith Rarick <kr@xph.us> | Mon Apr 18 18:24:15 2011 -0700 |
committer | Keith Rarick <kr@xph.us> | Mon Apr 18 18:24:15 2011 -0700 |
tree | dfe85fb04bd2551881f397e9fc1cced72ca72e7b | |
parent | e86b82e37c57ffa2c970a915ae7d768f46347228 [diff] |
target name should match 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.
$ goinstall github.com/kr/pretty.go
then
import "github.com/kr/pretty.go"