Documentation
¶
Index ¶
Constants ¶
const ( LuaTableError = "lua script output is not a lua table" LuaBoolError = "lua script output is not a lua bool" )
Variables ¶
This section is empty.
Functions ¶
func MapToTable ¶
MapToTable converts a Go map to a lua table credit to: https://github.com/yuin/gopher-lua/issues/160#issuecomment-447608033
func NewSandboxedState ¶ added in v1.18.0
NewSandboxedState returns a Lua state for running scripts that are not fully trusted. Compared to lua.NewState it:
- does not open the io and debug libraries;
- keeps only time related functions in os (time, date, clock, difftime);
- removes dofile and loadfile;
- empties package.path so that require can only load preloaded modules and never Lua files from the host file system.
The caller must still call Close on the returned state.
Types ¶
This section is empty.