Documentation ¶
Overview ¶
Package termui provides objects and methods for interactive UI in terminal windows.
License ¶
Governed by a 3-Clause BSD license. License file may be found in the root folder of this module.
Copyright © 2021 Norbert Pillmayer <norbert@pillmayer.com>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseREPL ¶
type BaseREPL struct { Interpreter REPLCommandInterpreter // the interpreter this REPL runs for Helper func(io.Writer) // print out help information // contains filtered or unexported fields }
BaseREPL is a base type to instantiate a REPL interpreter. Concrete REPL implementations will usually use this as a base type.
func NewBaseREPL ¶
NewBaseREPL create a new REPL base object intialized for an interpreter tool and a given version.
type BytePipe ¶
type BytePipe struct {
// contains filtered or unexported fields
}
func NewBytePipe ¶
func NewBytePipe() *BytePipe
type ChannelReader ¶
type ChannelReader struct {
// contains filtered or unexported fields
}
func NewChannelReader ¶
func NewChannelReader(ch <-chan byte) *ChannelReader
type ChannelWriter ¶
type ChannelWriter struct {
// contains filtered or unexported fields
}
func NewChannelWriter ¶
func NewChannelWriter(ch chan<- byte) *ChannelWriter
func (*ChannelWriter) Close ¶
func (cw *ChannelWriter) Close() error
type DefaultFormatter ¶
type DefaultFormatter struct{}
type REPLCommandInterpreter ¶
type REPLCommandInterpreter interface {
InterpretCommand(string)
}
REPLCommandInterpreter is an interface all interpreters have to implement. It is the workhorse doing interpretation of interactive commands.
The REPL will delegate interpreting command strings (i.e. those which do not represent internal administrative commands) to the interpreter.