Package contains is a libs for gopher-lua.
Development version, available on github, released under BSD 3-clause.
go get github.com/alexjx/gopher-lua-libs
- base64 encoding/base64 api
- cloudwatch aws cloudwatch log access
- cert_util monitoring ssl certs
- chef chef client api
- cmd cmd port
- crypto calculate md5, sha256 hash for string
- db access to databases
- filepath path.filepath port
- goos os port
- http http.client && http.server
- humanize humanize github.com/dustin/go-humanize port
- inspect pretty print github.com/kikito/inspect.lua
- ioutil io/ioutil port
- json json implementation
- log log port
- plugin run lua code in lua code
- pprof pprof http-server for golang from lua
- prometheus prometheus exporter
- regexp regexp port
- runtime runtime port
- pb https://github.com/cheggaaa/pb port (v3)
- shellescape shellescape https://github.com/alessio/shellescape port
- stats stats https://github.com/montanaflynn/stats port
- storage package for store persist data and share values between lua states
- strings strings port (utf supported)
- tac tac line-by-line scanner (from end of file to up)
- tcp raw tcp client lib
- telegram telegram bot
- template template engines
- time time port
- xmlpath gopkg.in/xmlpath.v2 port
- yaml gopkg.in/yaml.v2 port
- zabbix zabbix bot
For the quick overview you can use standalone interpreter with listed libs. Examples and documentation for modules can be found in their directories.
go get github.com/alexjx/gopher-lua-libs/cmd/glua-libs
$ glua-libs example.lua
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/alexjx/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)
}
}