model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagFile = "file"
)

Variables

This section is empty.

Functions

func NewModel

func NewModel(opts Options) tea.Model

func RunProgram

func RunProgram(ctx context.Context, opts *Options) (string, error)

Types

type KeyMap

type KeyMap struct {
	Quit       key.Binding
	Down       key.Binding
	Up         key.Binding
	Navigate   key.Binding
	LineNumber key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

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

func (KeyMap) ShortHelp

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

type Options

type Options struct {
	Input []byte
	File  *ast.File
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions(command *cobra.Command) (*Options, error)

func (*Options) Verify

func (o *Options) Verify() error

Jump to

Keyboard shortcuts

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