Documentation ¶
Overview ¶
Package convert provides functions for converting to and from Lua structures
Index ¶
- func Arguments2buffer(L *lua.LState, addNewline bool) bytes.Buffer
- func LValueMaps2table(L *lua.LState, maps []map[string]lua.LValue) *lua.LTable
- func Map2table(L *lua.LState, m map[string]string) *lua.LTable
- func PprintToWriter(w io.Writer, value lua.LValue)
- func Strings2table(L *lua.LState, sl []string) *lua.LTable
- func Table2interfaceMap(luaTable *lua.LTable) map[string]any
- func Table2interfaceMapGlua(luaTable *lua.LTable) (retmap map[any]any, isArray bool, err error)
- func Table2map(luaTable *lua.LTable, preferInt bool) (any, bool)
- func Table2maps(luaTable *lua.LTable) (map[string]string, map[string]int, map[int]string, map[int]int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arguments2buffer ¶
Arguments2buffer retrieves all the arguments given to a Lua function and gather the strings in a buffer.
func LValueMaps2table ¶
LValueMaps2table converts a []map[string]lua.LValue to a Lua table
func PprintToWriter ¶
PprintToWriter outputs more informative information than the memory location. Attempt to extract and print the values of the given lua.LValue. Does not add a newline at the end.
func Strings2table ¶
Strings2table converts a string slice to a Lua table
func Table2interfaceMap ¶
Table2interfaceMap converts a Lua table to a map[string]any If values are also tables, they are also attempted converted to map[string]any
func Table2interfaceMapGlua ¶
Table2interfaceMapGlua converts a Lua table to a map by using gluamapper. If the map really is an array (all the keys are indices), return true.
Types ¶
This section is empty.