Documentation

Overview

    Package luautil implements utility for gopher-lua.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    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 https://github.com/layeh/gopher-json/blob/master/util.go (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 https://github.com/layeh/gopher-json/blob/master/util.go (Public domain)

                Types

                This section is empty.

                Source Files