new
This commit is contained in:
@@ -22,6 +22,12 @@ func EncryptStructFields(inputStruct interface{}, key string) (map[string]interf
|
||||
field := v.Type().Field(i)
|
||||
fieldValue := v.Field(i)
|
||||
|
||||
// 检查字段的 encrypt 标签是否为 "false"
|
||||
encryptTag := field.Tag.Get("encrypt")
|
||||
if encryptTag == "false" {
|
||||
continue
|
||||
}
|
||||
|
||||
// 如果字段为空值,跳过
|
||||
if fieldValue.IsZero() {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user