mirror of
https://github.com/rancher/norman.git
synced 2025-09-20 10:41:04 +00:00
Don't consider nil values when merging
This commit is contained in:
@@ -90,13 +90,6 @@ func mergeMetadata(dest map[string]interface{}, src map[string]interface{}) map[
|
|||||||
}
|
}
|
||||||
|
|
||||||
func merge(field string, schema *types.Schema, schemas *types.Schemas, dest, src interface{}) interface{} {
|
func merge(field string, schema *types.Schema, schemas *types.Schemas, dest, src interface{}) interface{} {
|
||||||
if dest == nil {
|
|
||||||
return src
|
|
||||||
}
|
|
||||||
if src == nil {
|
|
||||||
return dest
|
|
||||||
}
|
|
||||||
|
|
||||||
if isMap(field, schema) {
|
if isMap(field, schema) {
|
||||||
return src
|
return src
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user