Use reflection to process the structure, process the fields with the `sen` tag (rule: `rule name, placeholder`, such as: `phone,*`), and desensitize it. Support custom handlers
### 定义结构体示例 Example
```go
package main
@ -16,17 +19,30 @@ type User struct {
Name string `json:"name"`
Age int `json:"age"`
Phone string `json:"phone" sen:"phone,*"`
Email string `json:"email" sen:"email,*"`
}
data := User{
Name: "lixh",
Age: 18,
Phone: "13888888888",
Email: "lixh@gmail.com",
}
// 添加自定义处理函数
// Add custom handler
sensitive.AddHandler("email", func(src, p string) string {