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
commit f593b8d975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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()))
}
}