feat(kontemplate): defaults can now have nested values

See https://b.tvl.fyi/issues/409 for details.

Change-Id: Ibb54fab7a78e0e5f708c2a7dc8bb26ac0b2b4689
Signed-off-by: Armin Schlegel <a.schlegel@gridx.de>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11972
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Armin Schlegel 2024-07-12 12:25:48 +02:00 committed by tazjin
parent 2beabe968c
commit 2357079891
2 changed files with 23 additions and 1 deletions

View file

@ -47,6 +47,9 @@ func TestMergeWithNilMap(t *testing.T) {
func TestMergeMaps(t *testing.T) {
map1 := map[string]interface{}{
"foo": "bar",
"baz": map[string]interface{}{
"qux": "quux",
},
}
map2 := map[string]interface{}{
@ -56,6 +59,9 @@ func TestMergeMaps(t *testing.T) {
result := Merge(&map1, &map2)
expected := map[string]interface{}{
"foo": "bar",
"baz": map[string]interface{}{
"qux": "quux",
},
"bar": "baz",
}