在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):vadv/gopher-lua-libs开源软件地址(OpenSource Url):https://github.com/vadv/gopher-lua-libs开源编程语言(OpenSource Language):Go 75.6%开源软件介绍(OpenSource Introduction):gopher-lua-libsPackage contains is a libs for gopher-lua. LicenseDevelopment version, available on github, released under BSD 3-clause. Installation
Index
UsageFor the quick overview you can use standalone interpreter with listed libs. Examples and documentation for modules can be found in their directories.
This example shows basic usage of this libs in your code package main
import (
"log"
"flag"
"os"
lua "github.com/yuin/gopher-lua"
libs "github.com/vadv/gopher-lua-libs"
)
var (
exec = flag.String("execute", "", "execute lua script")
)
func main() {
flag.Parse()
state := lua.NewState()
libs.Preload(state)
if *exec != `` {
if err := state.DoFile(*exec); err != nil {
log.Printf("[ERROR] Error executing file: ", err)
}
} else {
log.Println("Target file was not given!")
os.Exit(0)
}
}
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论