Merge pull request #125 from preethamrn/custom-stdio

Set custom stdio for Prompt
This commit is contained in:
James Bowes 2020-01-11 09:19:22 -04:00 committed by GitHub
commit 3e209d236a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,8 +47,8 @@ type Prompt struct {
// the Pointer defines how to render the cursor.
Pointer Pointer
stdin io.ReadCloser
stdout io.WriteCloser
Stdin io.ReadCloser
Stdout io.WriteCloser
}
// PromptTemplates allow a prompt to be customized following stdlib
@ -118,8 +118,8 @@ func (p *Prompt) Run() (string, error) {
}
c := &readline.Config{
Stdin: p.stdin,
Stdout: p.stdout,
Stdin: p.Stdin,
Stdout: p.Stdout,
EnableMask: p.Mask != 0,
MaskRune: p.Mask,
HistoryLimit: -1,