An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/lunixbochs/luaish-luar

Package luar provides custom type reflection to gopher-lua. This package is currently in development, and its behavior may change. This message will be removed once the package is considered stable. Go bool, number types, string types, and nil values are converted to the equivalent Lua type. Example: Channels have the following methods defined: Taking the length (#) of a channel returns how many unread items are in its buffer. Example: Functions can be converted and called from Lua. The function arguments and return values are automatically converted from and to Lua types, respectively (see exception below). Example: A function that has the signature func(*luar.LState) int can bypass the automatic argument and return value conversion (see luar.LState documentation for example). A special conversion case happens when function returns a lua.LValue slice. In that case, luar automatically unpacks the slice. Example: Maps can be accessed and modified like a normal Lua table. The map's length can also be queried using the # operator. Rather than using Lua's pairs function to create an map iterator, calling the value (e.g. map_variable()) returns an iterator for the map. Example: Like maps, slices be indexed, be modified, and have their length queried. Additionally, the following methods are defined for slices: For consistency with other Lua code, slices use one-based indexing. Example: Like maps, calling a slice (e.g. slice()) returns an iterator over its values. Arrays can be indexed and have their length queried. Only pointers to arrays can their contents modified. Like slices and maps, calling an array (e.g. array()) returns an iterator over its values. Example: Structs can have their fields accessed and modified and their methods called. Example: By default, the name of a struct field is determined by its tag: Example: Pointers can be dereferenced using the unary minus (-) operator. Example: The pointed to value can changed using the pow (^) operator. Example: Pointers to struct and array values are returned when accessed via a struct field, array index, or slice index. Any array, channel, map, slice, or struct type that has methods defined on it can be called from Lua. On maps with key strings, map elements are returned before type methods. Example: The Lua types are automatically converted to match the output Go type, as described below: Example creating a Go slice from Lua: Type constructors can be created using NewType. When called, it returns a new variable which is of the same type that was passed to NewType. Its behavior is dependent on the kind of value passed, as described below: Example: This package accesses and modifies the Lua state's registry. This happens when functions like New are called, and potentially when luar-created values are used. It is your responsibility to ensure that concurrent access of the state's registry does not happen.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/lunixbochs/luaish-luar
License: MPL-2.0
Latest release: about 8 years ago
First release: about 8 years ago
Namespace: github.com/lunixbochs
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 26 days ago

    Loading...
    Readme
    Loading...