Versions in this module Expand all Collapse all v1 v1.3.3 Jun 11, 2020 Changes in this version + var Default = &Main + var ErrAmbiguous = errors.New("ambiguous") + var ErrQuit = errors.New("") + var ParseError = errors.New("parse error") + func AddCommand(c Commander) + func Exec(w io.Writer, r io.Reader) error + func ExecInput(w io.Writer, in *Input) error + type Action func(c Commander, w Writer, in *Input) (err error) + type Command struct + Help string + Name string + ShortHelp string + func (c *Command) CliAction(w Writer, in *Input) (err error) + func (c *Command) CliHelp() string + func (c *Command) CliName() string + func (c *Command) CliShortHelp() string + type Commander interface + CliAction func(w Writer, in *Input) error + CliName func() string + type File struct + func (c *File) ReadReady() (err error) + func (c *File) RxReady() (err error) + func (c *File) WriteReady() (err error) + func (f *File) Write(p []byte) (n int, err error) + type FilePool struct + Files []File + func (p *FilePool) Elts() uint + func (p *FilePool) Foreach(f func(x File)) + func (p *FilePool) ForeachIndex(f func(i uint)) + func (p *FilePool) GetIndex() (i uint) + func (p *FilePool) IsFree(i uint) (v bool) + func (p *FilePool) Len() uint + func (p *FilePool) PutIndex(i uint) (ok bool) + func (p *FilePool) Reset() + func (p *FilePool) Resize(n uint) + func (p *FilePool) Validate(i uint) + type Helper interface + CliHelp func() string + type Input struct + type LoopStarter interface + CliLoopStart func(m *Main) + type Main struct + Prompt string + RxReady func(c *File) + func (c *Main) Add(name string, action Action) + func (c *Main) AddFile(f iomux.FileReadWriteCloser, cf ServerConfig) + func (c *Main) AddServer(config string, cf ServerConfig) (s *Server, err error) + func (c *Main) AddStdin() + func (c *Main) End() + func (c *Main) Exit() + func (c *Main) Loop() + func (m *Main) AddCommand(C Commander) + func (m *Main) Exec(w io.Writer, r io.Reader) error + func (m *Main) ExecInput(w io.Writer, in *Input) (err error) + func (m *Main) Start() + func (m *Main) Write(p []byte) (n int, err error) + type Server struct + func (p *Server) Elts() uint + func (p *Server) Foreach(f func(x client)) + func (p *Server) ForeachIndex(f func(i uint)) + func (p *Server) GetIndex() (i uint) + func (p *Server) IsFree(i uint) (v bool) + func (p *Server) Len() uint + func (p *Server) PutIndex(i uint) (ok bool) + func (p *Server) Reset() + func (p *Server) Resize(n uint) + func (p *Server) Validate(i uint) + func (s *Server) ReadReady() (err error) + type ServerConfig struct + DisablePrompt bool + EnableQuit bool + type ShortHelper interface + CliShortHelp func() string + type Writer interface