func Open(state *lua.State) int {
	var packageFuncs = map[string]lua.Func{
		"searchpath": lua.Func(pkgSearchPath),
		"loadlib":    lua.Func(pkgLoadLibrary),
	}
	state.NewTableSize(0, 8)
	state.SetFuncs(packageFuncs, 0)
	createSearchersTable(state)
	state.Push(lua.EnvPath)
	state.SetField(-2, "path")
	state.Push(lua.EnvHome)
	state.SetField(-2, "gopath")
	state.Push(lua.Config)
	state.SetField(-2, "config")
	state.GetSubTable(lua.RegistryIndex, lua.LoadedKey)
	state.SetField(-2, "loaded")
	state.GetSubTable(lua.RegistryIndex, lua.PreloadKey)
	state.SetField(-2, "preload")
	var loadFuncs = map[string]lua.Func{
		"require": lua.Func(require),
	}
	state.PushGlobals()
	state.PushIndex(-2)
	state.SetFuncs(loadFuncs, 1)
	state.Pop()
	return 1
}
Lua Standard Library -- load/package
package pkg
import (
	"fmt"
	"os"
	"plugin"
	"strings"
	"github.com/Azure/golua/lua"
)