Initial commit
This commit is contained in:
19
lua/lua.go
Normal file
19
lua/lua.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/yuin/gopher-lua"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetFlags(log.Lmicroseconds | log.Lshortfile)
|
||||
}
|
||||
|
||||
func main() {
|
||||
l := lua.NewState()
|
||||
defer l.Close()
|
||||
l.DoString(`i = 1; print(i)`)
|
||||
l.DoString(`i = i + 1; print(i)`)
|
||||
l.DoString(`print(i)`)
|
||||
}
|
Reference in New Issue
Block a user