I have a lua script a.lua, and in this file I required a Lua so module:
pb = require "pb"
print(pb)
and the pb module is a lua so in the same dir with a.lua
but, when the Golang code below not work
L := lua.NewState()
defer L.Close()
if err := L.DoFile("a.lua"); err != nil {
panic(err)
}
error message:
panic: <string>:1: module pb not found:
no field package.preload['pb']
stat ./pb.lua: no such file or directory
stat /usr/local/share/lua/5.1/pb.lua: no such file or directory
stat /usr/local/share/lua/5.1/pb/init.lua: no such file or directory,