Shopify / go-lua

A Lua VM in Go
MIT License
3.13k stars 190 forks source link

Support redirecting stdout/stdin/stderr to/from other sources #135

Open marco-souza opened 5 months ago

marco-souza commented 5 months ago

Description

This PR implements stdin, stdout, and stderr redirects.

This PR continues the work made by @jtolio at https://github.com/Shopify/go-lua/pull/43 🙏

Changes

Note: stderr is not being used in our code, the current implementation returns the error as a value. Therefore, stderr can be removed, but I left it for consistency.

I'm looking forward to your feedback!