- 授权协议: Apache-2.0
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/bytedance/go-tagexpr
- 软件文档: https://github.com/bytedance/go-tagexpr
- 官方下载: https://github.com/bytedance/go-tagexpr/releases
软件介绍
go-tagexpr 由字节跳动开源,实现了 Golang 结构体标签表达式解释器,可用于各种场景的请求参数校验。
主要特性:
支持各种常用运算符
支持访问数组、切片、字典的成员
支持访问当前结构中任意字段
支持访问嵌套字段、非导出字段等
内置 len、sprintf、regexp 函数
支持单表达式与多表达式两种定义模式
提供了参数校验子包
可以看一个参数校验的小例子:
package validator_test
import (
"fmt"
"github.com/bytedance/go-tagexpr/validator"
)
func Example() {
var vd = validator.New("vd")
type InfoRequest struct {
Name string `vd:"($!='Alice'||(Age)$==18) && regexp('\\w')"`
Age int `vd:"$>0"`
}
info := &InfoRequest{Name: "Alice", Age: 18}
fmt.Println(vd.Validate(info) == nil)
// Output:
// true
}
Introduction to the Design and Analysis of Algorithms
Anany Levitin / Addison Wesley / 2006-2-24 / USD 122.00
Based on a Based on a new classification of algorithm design techniques and a clear delineation of analysis methods, "Introduction to the Design and Analysis of Algorithms" presents the subject in a c......一起来看看 《Introduction to the Design and Analysis of Algorithms》 这本书的介绍吧!
