Back to / pkg / apps / luautil

Package luautil

Latest Go to latest

The highest tagged major version is .

Published: May 14, 2020 | License: MIT | Module:


Package luautil implements utility for gopher-lua.


func AddToPath

func AddToPath(L *lua.LState, npath string)

AddToPath append the given path the the Lua package.path

func FromJSON

func FromJSON(L *lua.LState, js []byte) lua.LValue

Convert the JSON to a Lua object ready to be pushed Adapted from (Public domain)

func InterfaceToLValue

func InterfaceToLValue(L *lua.LState, value interface{}) lua.LValue

InterfaceToLValue converts the given value to its `lua.LValue` counterpart

func TableToMap

func TableToMap(L *lua.LState, table *lua.LTable) map[string]interface{}

TableToMap converts a `*lua.LTable` to a `map[string]interface{}`

func TableToSlice

func TableToSlice(L *lua.LState, table *lua.LTable) []interface{}

TableToSlice converts a `*lua.LTable` to a `[]interface{}`

func ToJSON

func ToJSON(L *lua.LState, value lua.LValue) []byte

Convert a Lua table to JSON Adapted from (Public domain)

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier