vorl

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

vorl

A very opinionated REPL lib

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandResultList

type CommandResultList struct {
	List     []string
	OnSelect func(selected string) interface{}
}

type CommandResultSimple

type CommandResultSimple string

type CommandResultTable

type CommandResultTable struct {
	Table    [][]string
	OnSelect func(selected []string) interface{}
}

type Interpreter

type Interpreter interface {
	Exec(command string) (interface{}, error)

	Suggest(partialInput string) []string
}

type REPL

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

func NewREPL

func NewREPL(interpreter Interpreter, historyFile string) (*REPL, error)

func (*REPL) Run

func (r *REPL) Run() error

Jump to

Keyboard shortcuts

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