func pkgSearchPath(state *lua.State) int {
	unimplemented("package: searchpath")
	return 0
}
package.searchpath(name, path [, sep [, rep]])

See https://www.lua.org/manual/5.3/manual.html#pdf-package.searchpath
package pkg
import (
	"fmt"
	"os"
	"plugin"
	"strings"
	"github.com/Azure/golua/lua"
)
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
}
func require(state *lua.State) int {
	modname := state.CheckString(1)  
	state.GetField(lua.RegistryIndex, lua.LoadedKey)
	state.GetField(-1, modname)
	if state.ToBool(-1) {
		return 1  
	}
	state.Pop()
	searchLoader(state, modname)
	state.Push(modname)
	state.Insert(-2)
	state.Call(2, 1)
	return 1
}