func Split(L *lua.LState) int {
	str := L.CheckString(1)
	deli := ""
	if L.GetTop() > 1 {
		deli = L.CheckString(2)
	}
	strSlice := strings.Split(str, deli)
	result := L.CreateTable(len(strSlice), 0)
	for _, str := range strSlice {
		result.Append(lua.LString(str))
	}
	L.Push(result)
	return 1
}
Split lua strings.split(string, sep): port of go string.Split() returns table
package strings
import (
	"strings"
	lua "github.com/yuin/gopher-lua"
)