增加执行脚本 + 获取脚本返回结果的方法

This commit is contained in:
2024-11-14 18:22:25 +08:00
parent 13f78896c0
commit 316e120490
4 changed files with 95 additions and 1 deletions

17
vm_test.go Normal file
View File

@ -0,0 +1,17 @@
// Package lua ...
//
// Description : lua ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-11-14 18:08
package lua
import (
"testing"
)
func TestNewVm(t *testing.T) {
v := NewVm()
v.Run(`print("hello world"); return "hahaha", "heiheihei"`)
}