Documentation ¶
Index ¶
- func CompileScript(file string, opts ...ReplOption) error
- func Default() func() Liner
- func Run(opts ...ReplOption)
- func RunScript(file string, interactive bool, opts ...ReplOption)
- type History
- type KeyWord
- type Liner
- type LinerProducer
- type PromptOption
- type Repl
- type ReplOption
- type Result
- type StreamRepl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileScript ¶
func CompileScript(file string, opts ...ReplOption) error
func Run ¶
func Run(opts ...ReplOption)
func RunScript ¶
func RunScript(file string, interactive bool, opts ...ReplOption)
Types ¶
type History ¶
type History struct { List []string // contains filtered or unexported fields }
func GetHistory ¶
func GetHistory() *History
type Liner ¶
type Liner interface { Prompt(prefix string, o PromptOption) (string, error) Close() error }
type LinerProducer ¶
type LinerProducer func() Liner
type PromptOption ¶
type Repl ¶
type Repl struct { *glisp.Environment // contains filtered or unexported fields }
type ReplOption ¶
type ReplOption func(*Repl)
func SetLiner ¶
func SetLiner(l LinerProducer) ReplOption
type StreamRepl ¶
type StreamRepl struct {
// contains filtered or unexported fields
}
func NewStreamRepl ¶
func NewStreamRepl(env *glisp.Environment) *StreamRepl
func (*StreamRepl) IsRunning ¶
func (sr *StreamRepl) IsRunning() bool
func (*StreamRepl) Out ¶
func (sr *StreamRepl) Out() <-chan *Result
func (*StreamRepl) Stop ¶
func (sr *StreamRepl) Stop()
func (*StreamRepl) Write ¶
func (sr *StreamRepl) Write(str string)
Click to show internal directories.
Click to hide internal directories.