terminal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyHandler

func KeyHandler(
	key keyboard.Key,
	buffer *string,
	triggerAutocomplete func(),
	submit func(),
)

func MapKeys

func MapKeys(input map[string]State) []string

func MapKeysString

func MapKeysString(input map[string]string) []string

func ParseFlags

func ParseFlags(input string) map[string]string

Types

type ScreenWriter

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

func NewScreenWriter

func NewScreenWriter(contextName string) ScreenWriter

func (ScreenWriter) NewLine

func (writer ScreenWriter) NewLine()

func (ScreenWriter) WriteString

func (writer ScreenWriter) WriteString(input string)

func (ScreenWriter) WriteStringf

func (writer ScreenWriter) WriteStringf(input string, args ...any)

type State

type State interface {
	Name() string
	Initialize()
	HandleKeyinput(character rune, key keyboard.Key) State
}

Jump to

Keyboard shortcuts

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