[Pholcus] Go项目 Pholcus 编写静态规则文件, 0 到 1

1. 初始化项目包,go mod init [module-path]
比如:go mod init github.com/abc/efg

[Pholcus] Go项目 Pholcus 编写静态规则文件 

2. 新建一个目录放置我们编写的规则 go 文件。

[Pholcus] Go项目 Pholcus 编写静态规则文件

3. main.go 用下划线的方式引入规则文件,用于触发 init 函数内的注册。

[Pholcus] Go项目 Pholcus 编写静态规则文件

4. 启动:go run main.go

浏览器打开,选择单机模式启动可以查看规则列表。

[Pholcus] Go项目 Pholcus 编写静态规则文件, 0 到 1

Refer:Pholcus官方文档

Refer:Pholcus自定义规则

Link:https://www.cnblogs.com/farwish/p/15753783.html

原文地址:https://www.cnblogs.com/farwish/p/15753783.html