pager

package
v0.0.0-...-577f95d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	FlagPager   = "pager"
	FlagNoPager = "no-pager"
)
View Source
const (
	DefaultListPageSize = 20
)

Variables

This section is empty.

Functions

func NewPager

func NewPager(c *cli.Context, pager string) (io.Writer, func())

NewPager returns a writer such as stdout, "less", "more" or a pager provided by the user. A user can provide the pager name with a pager flag or env variable. If no pager is provided, it will fall back to stdout.

Types

type PagerOption

type PagerOption string
const (
	Stdout PagerOption = "stdout"
	Less   PagerOption = "less"
	More   PagerOption = "more"
)

Jump to

Keyboard shortcuts

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