model

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model holds the state of the application.

func NewModel

func NewModel(opts ModelOpts) *Model

NewModel returns a new Model configured with the given ModelOpts.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the application. It focuses on the selector element.

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages.

func (*Model) View

func (m *Model) View() string

View returns the view for this model. If the application is zoomed on the output window then just the output window and footer are rendered. Otherwise, all of the windows are rendered, with the unfocused windows shown with a faint style.

type ModelOpts

type ModelOpts struct {
	Selector    string
	Output      string
	Path        string
	LineNumbers bool
	Wrap        bool
}

ModelOpts defines the options that can be set on a Model.

Jump to

Keyboard shortcuts

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