Compare commits

...

2 commits
v0.1.2 ... main

Author SHA1 Message Date
7f1fc0890f Typo 2025-05-09 07:30:03 +02:00
3ae999c98b Added JSON response of LUA variable 2025-05-09 07:28:12 +02:00

6
pkg.go
View file

@ -38,6 +38,12 @@ func (l *LUA) GetStructFromLUA(ltable gopherLua.LValue, strct any) (err error) {
return
}
func (l *LUA) GetJSONFromLUA(ltable gopherLua.LValue) (j []byte) {
j, _ = luaJSON.Encode(ltable)
return
}
func (l *LUA) Run(script string) (err error) {
return l.state.DoString(script)
}