util

package
v0.0.0-...-46f8244 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepPush

func DeepPush(l *lua.State, v interface{}) int

DeepPush will put any basic Go type on the lua stack. If the value contains a map or a slice, it will recursively push those values as tables on the Lua stack.

Supported types are:

| Go                       | Lua
|-------------------------------------------------------------------------
| nil                      | nil
| bool                     | bool
| string                   | string
| any int                  | number (float64)
| any float                | number (float64)
| any complex              | number (real value as float64)
|                          |
| map[t]t                  | table, key and val `t` recursively
|                          | resolved
|                          |
| []t                      | table with array properties, with `t`
|                          | values recursively resolved

func DumpFrame

func DumpFrame(l *lua.State, w io.Writer) (n int, err error)

DumpFrame writes the currently visible frames of the Lua stack in a human-readable way.

func MustPullVarargs

func MustPullVarargs(l *lua.State, startIndex int) []interface{}

func Open

func Open(l *lua.State)

func PullStringTable

func PullStringTable(l *lua.State, idx int) (map[string]string, error)

func PullTable

func PullTable(l *lua.State, idx int) (interface{}, error)

func PullVarargs

func PullVarargs(l *lua.State, startIndex int) ([]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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