write

package
v0.0.0-...-f98cc9a Latest Latest
Warning

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

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

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{
	Confirm: key.NewBinding(
		key.WithKeys("ctrl+d"),
		key.WithHelp("ctrl+d", "confirm"),
	),
	Quit: key.NewBinding(
		key.WithKeys("esc", "ctrl+c"),
		key.WithHelp("esc", "quit"),
	),
}

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	Confirm key.Binding
	Quit    key.Binding
}

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type Model

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

func New

func New(defaultValue string, opts ...Option) *Model

func (Model) Data

func (m Model) Data() string

func (Model) DataString

func (m Model) DataString() string

func (Model) Error

func (m Model) Error() error

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) KeyBindings

func (m Model) KeyBindings() []key.Binding

func (Model) Quitting

func (m Model) Quitting() bool

func (Model) TeaProgramOpts

func (m Model) TeaProgramOpts() []tea.ProgramOption

func (Model) Update

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

func (Model) View

func (m Model) View() string

func (*Model) WithValidateFunc

func (m *Model) WithValidateFunc(vf ValidateFunc) *Model

type Option

type Option func(*Model)

func WithHelp

func WithHelp(show bool) Option

func WithKeyMap

func WithKeyMap(keyMap KeyMap) Option

func WithLineNumbers

func WithLineNumbers(enable bool) Option

func WithTeaProgramOpts

func WithTeaProgramOpts(opts ...tea.ProgramOption) Option

func WithValidateFunc

func WithValidateFunc(vf ValidateFunc) Option

func WithWidth

func WithWidth(width int) Option

type ValidateFunc

type ValidateFunc func(string) error

Jump to

Keyboard shortcuts

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