Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnCollector ¶
type ColumnCollector struct {
// contains filtered or unexported fields
}
A ColumnCollector may be used to collect lines of text with variable numbers and widths of columns, which can then be written out with aligned columns. The zero value is ready to use.
func (*ColumnCollector) AddField ¶
func (cc *ColumnCollector) AddField(str string) error
AddField will add a field (column in a line) to the current line being collected.
func (*ColumnCollector) CompleteLine ¶
func (cc *ColumnCollector) CompleteLine() error
CompleteLine marks the end of the current line being collected.
func (*ColumnCollector) WriteLeftAligned ¶
func (cc *ColumnCollector) WriteLeftAligned(w io.Writer) error
WriteLeftAligned will write all the collected lines to the specified writer, aligning the columns on the left side. All collected data are cleared on success.
Click to show internal directories.
Click to hide internal directories.