remove need for initial Exec before loop

This commit is contained in:
Alfred Kamanda 2024-09-20 22:16:43 +03:00
parent 63c7c65a00
commit e754773bce
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -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)