pager

package
v1.0.1-dev.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

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 used to write text to a terminal using the terminal's pager (less). It implements the WriteCloser interface and should be closed when writing is finished.

func NewWriter

func NewWriter() (*Writer, error)

NewWriter returns a new pager.Writer to be used to write paged text to the terminal

func (*Writer) Close

func (w *Writer) Close() error

Close is potentially a blocking call, as it will wait until the pager command terminates before returning.

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Write writes a slice of bytes to the Writer

Jump to

Keyboard shortcuts

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