script

package
v1.8.20220610 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnkownType  = errors.New("unknow lua type")
	ErrInvalidFile = errors.New("script file not exist")
)

Functions

func GetFileName added in v1.4.17

func GetFileName(L *lua.LState) (string, bool)

func JSON

func JSON(v interface{}) *jsonArg

func LoadLocalScriptByName

func LoadLocalScriptByName(dir, name string) error

Depercated: use LoadScripts instead

func LoadLocalScripts

func LoadLocalScripts(dir string) error

Depercated: use LoadScripts instead

func LoadScripts added in v1.4.17

func LoadScripts(path string) error

遇到脚本引入模块路径查找失败问题 简化设计,移除脚本压缩包加载支持

func PreloadModule

func PreloadModule(name string, f lua.LGFunction)

Types

type GenericMap added in v1.3.1

type GenericMap map[interface{}]interface{}

map[interface{}]interface{} to json map[1:1 2:2] to [1,2]

func (GenericMap) MarshalJSON added in v1.3.1

func (m GenericMap) MarshalJSON() ([]byte, error)

type Result

type Result struct {
	Err error
	// contains filtered or unexported fields
}

func Call

func Call(fileName, funcName string, args ...interface{}) *Result

func (Result) Scan

func (res Result) Scan(args ...interface{}) error

type Scanner

type Scanner interface {
	Scan(v lua.LValue) error
}

Jump to

Keyboard shortcuts

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