From aea035fe413247df2bf4e30da0675267b1bb1ab7 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Fri, 26 Mar 2021 01:12:55 -0400 Subject: [PATCH] wip(feat): bait package for hooks --- golibs/bait/bait.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 golibs/bait/bait.go diff --git a/golibs/bait/bait.go b/golibs/bait/bait.go new file mode 100644 index 0000000..a1a2615 --- /dev/null +++ b/golibs/bait/bait.go @@ -0,0 +1,22 @@ +package bait + +import ( + "github.com/chuckpreslar/emission" + "github.com/yuin/gopher-lua" +) + +type Bait struct{} + +func New() Bait { + return Bait{} +} + +func (b *Bait) Loader(L *lua.LState) int { + var exports = map[string]lua.LGFunction{} + mod := L.SetFuncs(L.NewTable(), exports) + + L.Push(mod) + + return 1 +} +