Start work on lua based plugin system
Some checks failed
/ docker (push) Has been cancelled

This commit is contained in:
Melody Becker 2025-06-02 17:40:53 +02:00
parent bf0aaaca8f
commit 94106bb82f
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
8 changed files with 430 additions and 1 deletions

11
plugins/util.go Normal file
View file

@ -0,0 +1,11 @@
package plugins
import lua "github.com/yuin/gopher-lua"
func lTableToMap(t *lua.LTable) map[lua.LValue]lua.LValue {
m := map[lua.LValue]lua.LValue{}
t.ForEach(func(l1, l2 lua.LValue) {
m[l1] = l2
})
return m
}