在go中使用lua示例, 基于gopher-lua!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
441 B

package luaInGo
import (
lua "github.com/yuin/gopher-lua"
"luaInGo/goApis"
"luaInGo/goApis/crypto"
"luaInGo/goApis/json"
"luaInGo/goApis/strings"
"luaInGo/goApis/time"
)
// 这里封装一个函数 统一load go中提供给lua调用的函数
func PreLoadGo(L *lua.LState) {
// 这里再调用一些子模块的LoadGo()函数
time.PreLoadGo(L)
strings.PreLoadGo(L)
crypto.PreLoadGo(L)
json.PreloadGo(L)
goApis.PreLoadLibs(L)
}