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 {