Merge pull request #2446 from legionus/docker-configuration-ptr

Fix the pointer initialization
This commit is contained in:
Derek McGowan
2020-02-22 16:42:17 -08:00
committed by GitHub
2 changed files with 71 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ func (p *Parser) overwriteStruct(v reflect.Value, fullpath string, path []string
}
case reflect.Ptr:
if field.IsNil() {
field.Set(reflect.New(sf.Type))
field.Set(reflect.New(field.Type().Elem()))
}
}