Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LState ¶
LState is a wrapper around lua.LState to augment it with our own methods.
func (*LState) OpenModules ¶
OpenModules loads the specified modules in the current LState. A loaded module is directly usable by the script without having to use a 'require' directive first.
func (*LState) PreloadModules ¶
PreloadModules preloads the specified modules in the current LState. A preloaded module is made available for inclusion but is not readily available to the script without the use of a 'require' directive first.
func (*LState) PreloadUserModule ¶
func (ls *LState) PreloadUserModule(modules []UserModule) error
type Module ¶
type Module struct { Name string Function lua.LGFunction }
Module is go code that can be called from Lua. It can be either directly opened and made available to the Lus script directly, or just preloaded, in which case it has to be included with a 'require' directive in the script before it can be used.
func StandardLibs ¶
func StandardLibs() []Module
StandardLibs returns the list of standard libraries to load for sandboxed usage.
type UserModule ¶
UserModule is a Lua sub-script that can be included in the main script through the use of a 'require' directive.