This commit is contained in:
parent
bf0aaaca8f
commit
94106bb82f
8 changed files with 430 additions and 1 deletions
23
plugins/runner.go
Normal file
23
plugins/runner.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package plugins
|
||||
|
||||
import lua "github.com/yuin/gopher-lua"
|
||||
|
||||
type Runner struct {
|
||||
state *lua.LState
|
||||
inUse bool
|
||||
}
|
||||
|
||||
func NewRunner() (*Runner, error) {
|
||||
lState, err := NewBlankState()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Runner{
|
||||
lState,
|
||||
false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *Runner) IsInUse() bool {
|
||||
return r.inUse
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue