This commit is contained in:
Kevin Wan
2022-12-13 00:16:31 +08:00
committed by GitHub
parent a49f9060c2
commit f76b976262
3 changed files with 483 additions and 431 deletions

View File

@@ -210,8 +210,8 @@ func isRightInclude(b byte) (bool, error) {
}
}
func maybeNewValue(field reflect.StructField, value reflect.Value) {
if field.Type.Kind() == reflect.Ptr && value.IsNil() {
func maybeNewValue(fieldType reflect.Type, value reflect.Value) {
if fieldType.Kind() == reflect.Ptr && value.IsNil() {
value.Set(reflect.New(value.Type().Elem()))
}
}