pager

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 7 Imported by: 0 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

Overview

Package pager manages launching and streaming output to terminal pagers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBrokenPipe

func IsBrokenPipe(err error) bool

IsBrokenPipe reports whether an error indicates a broken pipe or closed pipe.

Types

type Pager

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

Pager manages an active terminal pager subprocess.

func Start

func Start(disabled bool) (*Pager, io.Writer)

Start launches a pager (evaluating $GIT_PAGER -> core.pager -> $PAGER -> less -RFX) when stdout is a terminal and disabled is false. Returns a Pager handle (or nil if no pager was started) and the io.Writer to write to.

func (*Pager) Close

func (p *Pager) Close()

Close closes the pager input stream and waits for the subprocess to finish.

Jump to

Keyboard shortcuts

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