From e8798e1ab217d1d337637f8df04e9c958806b949 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 20 Sep 2024 22:16:43 +0300 Subject: [PATCH] remove need for initial Exec before loop --- cmd/main.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index c03a8ef..26ffe3a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -96,13 +96,7 @@ func main() { en = en.WithDebug(nil) } - _, err = en.Exec(ctx, []byte{}) - if err != nil { - fmt.Fprintf(os.Stderr, "engine init exited with error: %v\n", err) - os.Exit(1) - } - - err = engine.Loop(ctx, en, os.Stdin, os.Stdout) + err = engine.Loop(ctx, en, os.Stdin, os.Stdout, nil) if err != nil { fmt.Fprintf(os.Stderr, "loop exited with error: %v\n", err) os.Exit(1)