This commit is contained in:
parent
bf0aaaca8f
commit
94106bb82f
8 changed files with 430 additions and 1 deletions
11
plugins/util.go
Normal file
11
plugins/util.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue