ergochat/readline is largely API-compatible with the most commonly used functionality of chzyer/readline. See our godoc page for the current state of the public API; if an API you were using has been removed, its replacement may be readily apparent.
Here are some guidelines for APIs that have been removed or changed:
- readline used to expose most of
golang.org/x/term
, e.g.readline.IsTerminal
andreadline.GetSize
, as part of its public API; these functions are no longer exposed. We recommend importinggolang.org/x/term
itself as a replacement. - Various APIs that allowed manipulating the instance's configuration directly (e.g.
(*Instance).SetMaskRune
) have been removed. We recommend using(*Instance).SetConfig
instead. - The preferred name for
NewEx
is nowNewFromConfig
(NewEx
is provided as a compatibility alias). - The preferred name for
(*Instance).Readline
is nowReadLine
(Readline
is provided as a compatibility alias). PrefixCompleterInterface
was removed in favor of exposingPrefixCompleter
as a concrete struct type. In general, references toPrefixCompleterInterface
can be changed to*PrefixCompleter
.(Config).ForceUseInteractive
has been removed. Instead, set(Config).FuncIsTerminal
tofunc() bool { return true }
.