From c46807613ee95e2e11f12a81f7dfde12192ba705 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Tue, 29 Mar 2022 21:05:46 -0400 Subject: [PATCH] refactor: make loader functions for go modules unexported --- golibs/bait/bait.go | 4 ++-- golibs/commander/commander.go | 4 ++-- golibs/fs/fs.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/golibs/bait/bait.go b/golibs/bait/bait.go index 19b020d..3380470 100644 --- a/golibs/bait/bait.go +++ b/golibs/bait/bait.go @@ -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}, diff --git a/golibs/commander/commander.go b/golibs/commander/commander.go index 728ccaa..204e108 100644 --- a/golibs/commander/commander.go +++ b/golibs/commander/commander.go @@ -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}, diff --git a/golibs/fs/fs.go b/golibs/fs/fs.go index a2192a7..4cede57 100644 --- a/golibs/fs/fs.go +++ b/golibs/fs/fs.go @@ -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},