refactor: make loader functions for go modules unexported

lua5.4
TorchedSammy 2022-03-29 21:05:46 -04:00
parent a45b3fe1fa
commit c46807613e
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
3 changed files with 6 additions and 6 deletions

View File

@ -24,14 +24,14 @@ func New() Bait {
Em: emitter,
}
b.Loader = packagelib.Loader{
Load: b.LoaderFunc,
Load: b.loaderFunc,
Name: "bait",
}
return b
}
func (b *Bait) LoaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
func (b *Bait) loaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
exports := map[string]util.LuaExport{
"catch": util.LuaExport{b.bcatch, 2, false},
"catchOnce": util.LuaExport{b.bcatchOnce, 2, false},

View File

@ -18,14 +18,14 @@ func New() Commander {
Events: emission.NewEmitter(),
}
c.Loader = packagelib.Loader{
Load: c.LoaderFunc,
Load: c.loaderFunc,
Name: "commander",
}
return c
}
func (c *Commander) LoaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
func (c *Commander) loaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
exports := map[string]util.LuaExport{
"register": util.LuaExport{c.cregister, 2, false},
"deregister": util.LuaExport{c.cderegister, 1, false},

View File

@ -12,11 +12,11 @@ import (
)
var Loader = packagelib.Loader{
Load: LoaderFunc,
Load: loaderFunc,
Name: "fs",
}
func LoaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
func loaderFunc(rtm *rt.Runtime) (rt.Value, func()) {
exports := map[string]util.LuaExport{
"cd": util.LuaExport{fcd, 1, false},
"mkdir": util.LuaExport{fmkdir, 2, false},