Compare commits

..

2 commits

Author SHA1 Message Date
80f8a8fd3a
[#1396] cli/playground: Refactor
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-11-12 11:09:27 +03:00
2f3bc6eb84
[#1396] cli/playground: Improve terminal control key handling
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-11-12 11:07:48 +03:00

View file

@ -206,7 +206,7 @@ func (repl *policyPlaygroundREPL) run() error {
AutoComplete: policyPlaygroundCompleter,
})
if err != nil {
fmt.Println("error initializing readline:", err)
return fmt.Errorf("error initializing readline: %w", err)
}
defer rl.Close()
@ -221,7 +221,7 @@ func (repl *policyPlaygroundREPL) run() error {
exit = true
continue
}
return fmt.Errorf("reading line: %v", err)
return fmt.Errorf("reading line: %w", err)
}
exit = false