【文件属性】:
文件名称:easyrulesgo:Go中的Easy Rules端口
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-05 06:20:52
Go
EasyRulesGO
EasyRules到Golang的端口
请阅读EasyRules链接,以快速了解概念和工作流程。
实现默认规则引擎
允许复合规则(全部或全部)
作者/贡献者
作者/维护者
package easyrulesgo_test
import (
"fmt"
core "github.com/CrowdStrike/easyrulesgo/core"
)
// example taken from https://github.com/j-easy/easy-rules/wiki/shop
type person struct {
name string
age int
adult bool
}
/*-------- AGE RULE --------*/
type ageRule struct {
core. BasicRule
person * pe
【文件预览】:
easyrulesgo-master
----example_test.go(1KB)
----core()
--------rule_sorter.go(390B)
--------composite_rule.go(1KB)
--------default_rules_engine.go(3KB)
--------values.go(171B)
--------basic_rule.go(1KB)
--------default_logger.go(372B)
----LICENSE(1KB)
----rules_test.go(3KB)
----README.md(2KB)
----api()
--------rule.go(201B)
--------logger.go(246B)
--------mock_rule.go(2KB)
----cmd()
--------helloworld()
--------shoptest()