tabwriter

package
v1.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer is like tabwriter.Writer in the stdlibexcept that it's suitable for large numbers of items because it periodically flushes its contents and reprints a header when it does.

func NewWriter

func NewWriter(w io.Writer, header string) *Writer

NewWriter returns a new Writer, it will flush when it gets termHeight many lines, including the header line. The header line will be reprinted termHeight many lines have been written. NewStreamingWriter will panic if it's given a header that doesn't end in \n.

func (*Writer) Flush

func (w *Writer) Flush() error

Flush flushes the underlying tab writer.

func (*Writer) Write

func (w *Writer) Write(buf []byte) (int, error)

Write writes a line to the tabwriter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL