func (i *Instance) WriteStdin(val []byte) (int, error) {
	return i.Terminal.WriteStdin(val)
}
WriteStdin prefill the next Stdin fetch
Next time you call ReadLine() this value will be writen before the user input
ie :
i := readline.New()
i.WriteStdin([]byte("test"))
_, _= i.Readline()

gives

> test[cursor]
package readline
import "io"
type Instance struct {
	Config    *Config
	Terminal  *Terminal
	Operation *Operation
}
type Config struct {
	Prompt string
	HistoryFile string
	HistoryLimit           int
	DisableAutoSaveHistory bool
	HistorySearchFold bool
	AutoComplete AutoCompleter
	Listener Listener
	Painter Painter
	VimMode bool
	InterruptPrompt string
	EOFPrompt       string
	FuncGetWidth func() int
	Stdin       io.ReadCloser
	StdinWriter io.Writer
	Stdout      io.Writer
	Stderr      io.Writer
	EnableMask bool
	MaskRune   rune
	UniqueEditLine bool
	FuncFilterInputRune func(rune) (rune, bool)
	FuncIsTerminal      func() bool
	FuncMakeRaw         func() error
	FuncExitRaw         func() error
	FuncOnWidthChanged  func(func())
	ForceUseInteractive bool
	inited    bool
	opHistory *opHistory
	opSearch  *opSearch
}
func (c *Config) useInteractive() bool {
	if c.ForceUseInteractive {
		return true
	}
	return c.FuncIsTerminal()
}
func (c *Config) Init() error {
	if c.inited {
		return nil
	}
	c.inited = true
	if c.Stdin == nil {
		c.Stdin = NewCancelableStdin(Stdin)
	}
	c.Stdin, c.StdinWriter = NewFillableStdin(c.Stdin)
	if c.Stdout == nil {
		c.Stdout = Stdout
	}
	if c.Stderr == nil {
		c.Stderr = Stderr
	}
	if c.HistoryLimit == 0 {
		c.HistoryLimit = 500
	}
	if c.InterruptPrompt == "" {
		c.InterruptPrompt = "^C"
	} else if c.InterruptPrompt == "\n" {
		c.InterruptPrompt = ""
	}
	if c.EOFPrompt == "" {
		c.EOFPrompt = "^D"
	} else if c.EOFPrompt == "\n" {
		c.EOFPrompt = ""
	}
	if c.AutoComplete == nil {
		c.AutoComplete = &TabCompleter{}
	}
	if c.FuncGetWidth == nil {
		c.FuncGetWidth = GetScreenWidth
	}
	if c.FuncIsTerminal == nil {
		c.FuncIsTerminal = DefaultIsTerminal
	}
	rm := new(RawMode)
	if c.FuncMakeRaw == nil {
		c.FuncMakeRaw = rm.Enter
	}
	if c.FuncExitRaw == nil {
		c.FuncExitRaw = rm.Exit
	}
	if c.FuncOnWidthChanged == nil {
		c.FuncOnWidthChanged = DefaultOnWidthChanged
	}
	return nil
}
func (c Config) Clone() *Config {
	c.opHistory = nil
	c.opSearch = nil
	return &c
}
func (c *Config) SetListener(f func(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)) {
	c.Listener = FuncListener(f)
}
func (c *Config) SetPainter(p Painter) {
	c.Painter = p
}
func NewEx(cfg *Config) (*Instance, error) {
	t, err := NewTerminal(cfg)
	if err != nil {
		return nil, err
	}
	rl := t.Readline()
	if cfg.Painter == nil {
		cfg.Painter = &defaultPainter{}
	}
	return &Instance{
		Config:    cfg,
		Terminal:  t,
		Operation: rl,
	}, nil
}
func New(prompt string) (*Instance, error) {
	return NewEx(&Config{Prompt: prompt})
}
func (i *Instance) ResetHistory() {
	i.Operation.ResetHistory()
}
func (i *Instance) SetPrompt(s string) {
	i.Operation.SetPrompt(s)
}
func (i *Instance) SetMaskRune(r rune) {
	i.Operation.SetMaskRune(r)
}
func (i *Instance) SetHistoryPath(p string) {
	i.Operation.SetHistoryPath(p)
}
func (i *Instance) Stdout() io.Writer {
	return i.Operation.Stdout()
}
func (i *Instance) Stderr() io.Writer {
	return i.Operation.Stderr()
}
func (i *Instance) SetVimMode(on bool) {
	i.Operation.SetVimMode(on)
}
func (i *Instance) IsVimMode() bool {
	return i.Operation.IsEnableVimMode()
}
func (i *Instance) GenPasswordConfig() *Config {
	return i.Operation.GenPasswordConfig()
}
func (i *Instance) ReadPasswordWithConfig(cfg *Config) ([]byte, error) {
	return i.Operation.PasswordWithConfig(cfg)
}
func (i *Instance) ReadPasswordEx(prompt string, l Listener) ([]byte, error) {
	return i.Operation.PasswordEx(prompt, l)
}
func (i *Instance) ReadPassword(prompt string) ([]byte, error) {
	return i.Operation.Password(prompt)
}
type Result struct {
	Line  string
	Error error
}
func (l *Result) CanContinue() bool {
	return len(l.Line) != 0 && l.Error == ErrInterrupt
}
func (l *Result) CanBreak() bool {
	return !l.CanContinue() && l.Error != nil
}
func (i *Instance) Line() *Result {
	ret, err := i.Readline()
	return &Result{ret, err}
}
func (i *Instance) Readline() (string, error) {
	return i.Operation.String()
}
func (i *Instance) ReadlineWithDefault(what string) (string, error) {
	i.Operation.SetBuffer(what)
	return i.Operation.String()
}
func (i *Instance) SaveHistory(content string) error {
	return i.Operation.SaveHistory(content)
}
func (i *Instance) ReadSlice() ([]byte, error) {
	return i.Operation.Slice()
}
func (i *Instance) Close() error {
	if err := i.Terminal.Close(); err != nil {
		return err
	}
	i.Config.Stdin.Close()
	i.Operation.Close()
	return nil
}
func (i *Instance) Clean() {
	i.Operation.Clean()
}
func (i *Instance) Write(b []byte) (int, error) {
	return i.Stdout().Write(b)
}