summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-08-23 21:52:27 +0600
committerunwox <me@unwox.com>2024-08-23 21:52:27 +0600
commit09509f7d8932829d6392f1787b1de1df4ebd8a7e (patch)
tree3a729047dd2ea7af1ab2234105042e58bcc765c9 /main.go
parent260c293cd9c15e1a7da01563f7f6c96c4f2f9ceb (diff)
do not try to execute empty repl commands
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index 923260d..7ebee5b 100644
--- a/main.go
+++ b/main.go
@@ -160,6 +160,9 @@ func main() {
reader := bufio.NewReader(os.Stdin)
for {
code, _ := reader.ReadString('\n')
+ if len(code) == 0 {
+ continue
+ }
for _, wrk := range wrks {
if err := wrk.Eval(code); err != nil {
log.Printf("error: %s\n", err)