From 721dfd1e4fe2d4e0cc5a7ca83897ff3f624205b2 Mon Sep 17 00:00:00 2001 From: Benjamin VAUDOUR Date: Wed, 21 Feb 2024 10:50:17 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20bug=20readline=20+=20maj=20des=20d?= =?UTF-8?q?=C3=A9pendances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 4 +++- go.sum | 2 ++ readline.go | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 go.sum diff --git a/go.mod b/go.mod index b18831e..00cf530 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module gitea.zaclys.com/bvaudour/readline -go 1.21.3 +go 1.22 + +require gitea.zaclys.com/bvaudour/gob v0.0.0-20240221091259-5b437644bd67 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..351014a --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +gitea.zaclys.com/bvaudour/gob v0.0.0-20240221091259-5b437644bd67 h1:Fe9g2grCWVsKCZktydlUNff4ihjRIWO2U7EBVHosdOw= +gitea.zaclys.com/bvaudour/gob v0.0.0-20240221091259-5b437644bd67/go.mod h1:Gw6x0KNKoXv6AMtRkaI+iWM2enVzwHikUSskuEzWQz4= diff --git a/readline.go b/readline.go index e994b65..9bcc281 100644 --- a/readline.go +++ b/readline.go @@ -192,7 +192,7 @@ func (rl *Readline) prompt(p string, isPassword bool) (result Result[string]) { } } - if isErr { + if !isErr { r, _ := rl.st.Buffer() result = Ok(r) if !isPassword && len(r) > 0 {