Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fprint ¶
Fprint calls Formatter.Fprint with the default Formatter.
Types ¶
type Formatter ¶
type Formatter struct {
// ShowUnexported bool // display unexported fields
ShowZero bool // display struct fields that have their zero value
MaxWidth int // maximum columns, but not breaking words
Compact bool // as few lines as possible, observing MaxWidth
Indent string // ignored if Compact; default is 4 spaces
MaxDepth int // max recursion depth; default is 100
MaxElements int // max array, slice or map elements to print
OmitPackage bool // don't print package in type names
// contains filtered or unexported fields
}
A Formatter formats Go values. It follows pointers recursively, detecting cycles. Configure a Formatter by setting the exported fields before calling a formatting method. The defaults are designed to work well in tests.
func (*Formatter) IgnoreFields ¶
IgnoreFields causes f to skip printing of the named fields of values of structval's type. Structval must be a struct or a pointer to a struct. It returns its receiver.
Click to show internal directories.
Click to hide internal directories.