func (ui *UI) SetIO(in io.Reader, out io.Writer) {
	ui.i = in
	ui.o = out
}
SetIO sets the interpreters I/O.
package sand
import (
	"bytes"
	"context"
	"fmt"
	"github.com/pkg/errors"
	"io"
	"net"
	"os"
	"os/signal"
	"runtime"
	"sync"
)
var errNoEngine = errors.New("sand: engine must be non-null")
func IsRecoverable(err error) (root error, ok bool) {
	if err == nil {
		return nil, true
	}
	root = errors.Cause(err)
	if root == context.DeadlineExceeded || root == context.Canceled {
		return root, true
	}
errTypes:
	switch v := root.(type) {
	case net.Error:
	case runtime.Error:
	case newLineErr:
		root = v.werr
		goto errTypes
	default:
		return root, true
	}
	return
}
type SignalHandler func(os.Signal) os.Signal
type Option func(*UI)
func WithPrefix(prefix string) Option {
	return func(ui *UI) {
		ui.prefix = []byte(prefix)
	}
}
func WithIO(in io.Reader, out io.Writer) Option {
	return func(ui *UI) {
		ui.i = in
		ui.o = out
	}
}
func WithSignalHandlers(handlers map[os.Signal]SignalHandler) Option {
	return func(ui *UI) {
		ui.sigHandlers = handlers
	}
}
type UI struct {
	i           io.Reader
	o           io.Writer
	prefix      []byte
	sigHandlers map[os.Signal]SignalHandler
	ctx context.Context  
}
func (ui *UI) SetPrefix(prefix string) {
	ui.prefix = []byte(prefix)
}