pager

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package pager shows a rendered document one screen at a time on the user's terminal. It is deliberately dumb about policy: callers decide WHETHER to page (TTY, output mode, agent detection, --no-pager); this package only decides HOW — an explicit JIRA_PAGER/PAGER command when the user configured one, otherwise a built-in viewport, so paging works on Windows where less is often absent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Overflows

func Overflows(f *os.File, content string) bool

Overflows reports whether content is taller than the terminal f writes to. A non-terminal (or size probe failure) reports false, so callers that gate paging on it degrade to plain streaming.

func Run

func Run(content string) error

Run pages content on the controlling terminal. An explicit JIRA_PAGER (then PAGER) environment value runs as an external pager with the content on stdin — users who want less get less — and an empty value or lookup failure falls back to the built-in viewport. The variables are split with POSIX display semantics so "less -R" style values work; they are the user's own local configuration, not remote input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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