1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-04 00:34:39 +00:00

Switch to go modules

This commit is contained in:
Darren Shepherd
2019-08-19 10:03:03 -07:00
parent 07c964e242
commit 40212fa263
5606 changed files with 263147 additions and 766229 deletions

View File

@@ -45,7 +45,11 @@ func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.Te
break
}
if v.IsNil() {
v.Set(reflect.New(v.Type().Elem()))
if v.CanSet() {
v.Set(reflect.New(v.Type().Elem()))
} else {
v = reflect.New(v.Type().Elem())
}
}
if v.Type().NumMethod() > 0 {
if u, ok := v.Interface().(json.Unmarshaler); ok {