glua

package module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

README

glua

简介

glua 基于 gopher-lua 二次开发,在原版基础上新增了许多模块

安装

go get github.com/r0kyi/glua

使用

直接安装二进制版本

go install github.com/r0kyi/glua/cmd/glua@latest
glua <lua file>

在 go 代码中使用

package main

import (
	"os"

	"github.com/r0kyi/glua"
)

func main() {
	L := glua.NewState()
	defer L.Close()

	args := os.Args
	if len(args) < 2 {
		println("usage: glua <lua file>")
		return
	}

	if err := L.DoFile(args[1]); err != nil {
		println(err.Error())
	}
}

模块列表

模块名称 模块介绍
base base 编解码
cron 计划任务
crypto 加解密
database 数据库连接
format 格式化字符串
http http 请求
json json 解析
jwt jwt 解析
re 正则
time 时间
uuid 通用唯一识别码
validator 数据验证
web web 服务
xml xml 解析
yaml yaml 解析

特别鸣谢

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewState

func NewState() *lua.LState

Types

This section is empty.

Directories

Path Synopsis
cmd
glua command
plugin
jwt
re
web
xml

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL