rule

package
v0.0.0-...-e5591e2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFunctions

func RegisterFunctions(tpl *template.Template)

RegisterFunctions 注册方法

Types

type Rule

type Rule struct {
	Key   string // 规则类型
	Value string // 规则内容
}

Rule 获取规则 目前从注释中正则获取

type TemplateInfo

type TemplateInfo struct {
	Field protogen.Field // field 内容
	Key   string         // key 名 正常情况为 m.GetX() repeated 情况为 item
	Value string         // value
}

TemplateInfo 用以生成最终的 rule 模版

Jump to

Keyboard shortcuts

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