lunatico

package module
v0.0.0-...-a280348 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 5 Imported by: 0

README

This library makes it easy for people who don't understand the Lua stack thing to run Lua scripts inside Go programs. It uses https://github.com/aarzilli/golua underneath (but could be easily ported to other Lua implementations as the functions are almost the same).

See the small test file for how to use (hint: it's basically (i) set some globals, (ii) run Lua code, (iii) get globals back).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFullStack

func GetFullStack(L *lua.State) []interface{}

func GetGlobals

func GetGlobals(L *lua.State, names ...string) map[string]interface{}

func PushAny

func PushAny(L *lua.State, ival interface{})

func PushMap

func PushMap(L *lua.State, m map[string]interface{})

push stuff

func PushSlice

func PushSlice(L *lua.State, s []interface{})

func ReadAny

func ReadAny(L *lua.State, pos int) interface{}

read stuff

func ReadString

func ReadString(L *lua.State, pos int) (v string)

func ReadTable

func ReadTable(L *lua.State, pos int) interface{}

func SetGlobals

func SetGlobals(L *lua.State, globals map[string]interface{})

utils

Types

type LuaFunction

type LuaFunction struct{}

used to be returned when we find a lua function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL