增加指针 nil 验证

This commit is contained in:
2024-09-05 17:49:50 +08:00
parent a6583fe84d
commit 98d9eec6bb
2 changed files with 26 additions and 0 deletions

5
run.go
View File

@ -153,6 +153,11 @@ func getDataStatus(val gjson.Result, dataType string) string {
if len(val.Map()) == 0 {
return consts.DataStatusIsEmpty
}
} else if strings.HasPrefix(dataType, "*") {
// 指针类型
if nil == val.Value() {
return consts.DataStatusIsNil
}
}
}
return ""