Do nothing on empty input

This commit is contained in:
2025-10-21 22:16:16 +01:00
parent d1d9106e2e
commit a748c9644a
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -34,7 +34,7 @@ func NewREPL(cfg REPLCfg) *REPL {
}
}
func (r *REPL) CloseREPL() {
func (r *REPL) Close() {
// Do whatever cleanup we have to do
}
@@ -60,6 +60,10 @@ func (r *REPL) mainLoop() {
}
args := parseInput(strings.TrimSpace(line))
if args[0] == "" {
continue
}
command, exists := r.Commands[args[0]]
if exists {
_ = command.Action(r, args[1:])