mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-04-30 03:50:39 +00:00
da0c8b6f28
Refactor pushInterfaceToLua to delegate unsupported types (nil, bool/int/float/string/map/slice) recursively via new lvalueFromInterface helper. Simplify typed slice and map handlers, remove explicit nil case (now handled by lvalueFromInterface), eliminate redundant type switches in pushMapStringIntToLua and similar functions. Add new luajson.go with RegisterJSON, lua.JSONEncode/Decode bindings using lvalueFromInterface and Table2 Interface for bidirectional round-trips. Include comprehensive tests covering scalars, nested structures (e.g., kmindex response), arrays and error cases.
11 lines
208 B
Go
11 lines
208 B
Go
package obilua
|
|
|
|
import lua "github.com/yuin/gopher-lua"
|
|
|
|
func RegisterObilib(luaState *lua.LState) {
|
|
RegisterObiSeq(luaState)
|
|
RegisterObiTaxonomy(luaState)
|
|
RegisterHTTP(luaState)
|
|
RegisterJSON(luaState)
|
|
}
|