Documentation ¶
Overview ¶
Lightweight Golang REPL library, inspired by GNU readline. You provide the Eval function, and go-repl does the rest.
Index ¶
Constants ¶
View Source
const MACHINE_INTERVAL = time.Millisecond
This is a cut-off time for grouping auto-generated escape sequences.
Variables ¶
View Source
var ( // Period between polls for terminal size changes. // 10ms is the default, human reaction times are an order of magnitude slower than this interval, // and auto generated escape sequence bytes are an order of magnitude faster than this interval. SIZE_POLLING_INTERVAL = 10 * time.Millisecond // Used by the package maintainer: DEBUG = "" // a non-empty string specifies the destination file for debugging info )
Functions ¶
This section is empty.
Types ¶
type Repl ¶
type Repl struct {
// contains filtered or unexported fields
}
func (*Repl) Loop ¶ added in v0.2.0
Start the REPL loop.
Loop sets the terminal to raw mode, so any further calls to fmt.Print or similar, might not behave as expected and can garble your REPL.
Click to show internal directories.
Click to hide internal directories.