ref: d2f94c8a8effcbab02b0db0bccc4fa64dd616fc4
dir: /readline.go/
//go:build !plan9
package main
import (
native "github.com/ergochat/readline"
)
type readline struct {
*native.Instance
}
var (
ErrInterrupt = native.ErrInterrupt
)
type Config = native.Config
const (
CharCtrlJ = native.CharCtrlJ
CharInterrupt = native.CharInterrupt
CharEnter = native.CharEnter
)
func NewReadline(config *Config) (*readline, error) {
instance, err := native.NewEx(config)
if err != nil {
return nil, err
}
return &readline{instance}, nil
}