Versions in this module Expand all Collapse all v1 v1.0.1 Oct 11, 2023 v1.0.0 Jan 22, 2023 Changes in this version + type Arguments = map[string]string + type BasicScanner interface + Err func() error + Scan func(prompt string) bool + Text func() string + type Context struct + func NewContext() *Context + func (ctx *Context) GetAllVars() (all Arguments) + func (ctx *Context) GetScope(scope Scope) Arguments + func (ctx *Context) GetVar(k string) (string, bool) + func (ctx *Context) GetVarNames() (names []string) + func (ctx *Context) PopScope() + func (ctx *Context) PushScope(vars map[string]string, args []string) + func (ctx *Context) ReadBlock(body, next, cont string) ([]string, []string, error) + func (ctx *Context) ReadLine(prompt, cont string) (line string, err error) + func (ctx *Context) ResetTerminal() + func (ctx *Context) RestoreMode(m liner.ModeApplier) + func (ctx *Context) ScanBlock(block []string) BasicScanner + func (ctx *Context) ScanLiner() BasicScanner + func (ctx *Context) ScanReader(r io.Reader) BasicScanner + func (ctx *Context) SetScanner(curr BasicScanner) (prev BasicScanner) + func (ctx *Context) SetVar(k string, v interface{}, scope Scope) + func (ctx *Context) SetWordCompleter(...) + func (ctx *Context) ShiftArgs(n int) + func (ctx *Context) StartLiner(history string) + func (ctx *Context) StopLiner() + func (ctx *Context) TerminalMode() (liner.ModeApplier, error) + func (ctx *Context) UnsetVar(k string, scope Scope) + func (ctx *Context) UpdateHistory(line string) + func (ctx *Context) UpdateVar(k string, scope Scope, update func(string) interface{}) string + type Dict = map[string]interface + type List = []interface + type ScanLiner struct + func (s *ScanLiner) Err() error + func (s *ScanLiner) Scan(prompt string) bool + func (s *ScanLiner) Text() string + type ScanLines struct + func (s *ScanLines) Err() (err error) + func (s *ScanLines) Scan(prompt string) bool + func (s *ScanLines) Text() (text string) + type ScanReader struct + func (s *ScanReader) Err() error + func (s *ScanReader) Scan(prompt string) bool + func (s *ScanReader) Text() string + type Scope int + const GlobalScope + const InvalidScope + const LocalScope + const ParentScope + func (s Scope) String() string