func osRemove(state *lua.State) int {
	if err := os.Remove(state.CheckString(1)); err != nil {
		state.Push(nil)
		state.Push(err.Error())
		return 2
	}
	state.Push(true)
	return 1
}
os.remove (filename)

Deletes the file (or empty directory, on POSIX systems) with the given name. If this function fails, it returns nil,
plus a string describing the error and the error code. Otherwise, it returns true.

See https://www.lua.org/manual/5.3/manual.html#pdf-os.remove
package os
import (
	"fmt"
	"io/ioutil"
	"os"
	"time"
	"github.com/Azure/golua/lua"
)
func Open(state *lua.State) int {
	var osFuncs = map[string]lua.Func{
		"clock":     lua.Func(osClock),
		"date":      lua.Func(osDate),
		"difftime":  lua.Func(osDiffTime),
		"execute":   lua.Func(osExecute),
		"exit":      lua.Func(osExit),
		"getenv":    lua.Func(osGetEnv),
		"remove":    lua.Func(osRemove),
		"rename":    lua.Func(osRename),
		"setlocale": lua.Func(osSetLocale),
		"time":      lua.Func(osTime),
		"tmpname":   lua.Func(osTmpName),
	}
	state.NewTableSize(0, len(osFuncs))
	state.SetFuncs(osFuncs, 0)
	return 1
}
func osClock(state *lua.State) int {
	state.Push(time.Since(epoch).Seconds())
	return 1
}
func osDate(state *lua.State) int {
	unimplemented("os.date")
	return 0
}
func osDiffTime(state *lua.State) int {
	unimplemented("os.difftime")
	return 0
}
func osExecute(state *lua.State) int {
	unimplemented("os.execute")
	return 0
}
func osExit(state *lua.State) int {
	var code int
	if state.IsBool(1) {
		if !state.ToBool(1) {
			code = 1
		}
	} else {
		code = int(state.OptInt(1, 0))
	}
	if state.ToBool(2) {
		state.Close()
	}
	os.Exit(code)
	return 0
}
func osGetEnv(state *lua.State) int {
	env := os.Getenv(state.CheckString(1))
	if env == "" {
		state.Push(nil)
	} else {
		state.Push(env)
	}
	return 1
}