packagelib

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachedLoadedTable

func CachedLoadedTable(r *rt.Runtime, name rt.String) (*rt.Table, error)

CachedLoadedTable returns the package.loaded.name table.

func CallPackageFunc

func CallPackageFunc(t *rt.Thread, modname string, funcname string, arg ...rt.Value) ([]rt.Value, error)

CallPackageFunc calls the function "modname.funcname" with the given arguments. The module modname will be loaded into the runtime via require.

func LoadedTable

func LoadedTable(r *rt.Runtime) (*rt.Table, error)

LoadedTable returns the package.loaded table.

func Require

func Require(modname string, t *rt.Thread) (rt.Value, error)

Require loads the given module. The function starts by looking into the package.loaded table to determine whether modname is already loaded. If it is, then require returns the value stored at package.loaded[modname]. Otherwise, it tries to find a loader for the module. See the documentation for the Lua "require" function for details.

Types

This section is empty.

Jump to

Keyboard shortcuts

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