pager

package
v1.201.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package pager is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentFitsTerminal added in v1.182.0

func ContentFitsTerminal(content string) bool

ContentFitsTerminal checks if the given string content fits within terminal dimensions.

func StripANSI

func StripANSI(input string) string

StripANSI removes ANSI escape sequences (like terminal colors) from input.

Types

type MockPageCreator

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

MockPageCreator is a mock of PageCreator interface.

func NewMockPageCreator

func NewMockPageCreator(ctrl *gomock.Controller) *MockPageCreator

NewMockPageCreator creates a new mock instance.

func (*MockPageCreator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPageCreator) Run

func (m *MockPageCreator) Run(title, content string) error

Run mocks base method.

type MockPageCreatorMockRecorder

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

MockPageCreatorMockRecorder is the mock recorder for MockPageCreator.

func (*MockPageCreatorMockRecorder) Run

func (mr *MockPageCreatorMockRecorder) Run(title, content any) *gomock.Call

Run indicates an expected call of Run.

type MockTerminalSizer added in v1.182.0

type MockTerminalSizer struct {
	Width  int
	Height int
	Error  error
}

Mock implementation for testing.

func (MockTerminalSizer) GetSize added in v1.182.0

func (m MockTerminalSizer) GetSize(fd int) (width, height int, err error)

type PageCreator

type PageCreator interface {
	Run(title, content string) error
}

func New

func New() PageCreator

func NewWithAtmosConfig added in v1.182.0

func NewWithAtmosConfig(enablePager bool) PageCreator

type RealTerminalSizer added in v1.182.0

type RealTerminalSizer struct{}

Real implementation.

func (RealTerminalSizer) GetSize added in v1.182.0

func (r RealTerminalSizer) GetSize(fd int) (width, height int, err error)

type TermSize added in v1.182.0

type TermSize struct {
	Width  int
	Height int
}

TermSize represents terminal dimensions.

type TerminalSizer added in v1.182.0

type TerminalSizer interface {
	GetSize(fd int) (width, height int, err error)
}

Interface for testability.

Jump to

Keyboard shortcuts

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