tabwriter

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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