This commit is contained in:
withchao 2023-03-24 17:43:52 +08:00
parent 7975a377a0
commit 9f19fd46e7

View File

@ -14,6 +14,9 @@ type ApiResponse struct {
func isAllFieldsPrivate(v any) bool {
typeOf := reflect.TypeOf(v)
if typeOf == nil {
return false
}
if typeOf.Kind() == reflect.Ptr {
typeOf = typeOf.Elem()
}