Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
7f1fc0890f | |||
3ae999c98b |
1 changed files with 6 additions and 0 deletions
6
pkg.go
6
pkg.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue