Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'

This commit is contained in:
Bjørn Erik Pedersen
2023-05-22 16:47:07 +02:00
341 changed files with 3107 additions and 4238 deletions

View File

@@ -1,17 +1,13 @@
---
title: merge
description: "Returns the result of merging two or more maps."
date: 2019-08-08
categories: [functions]
menu:
docs:
parent: "functions"
parent: functions
keywords: [dictionary]
signature: ["collections.Merge MAP MAP...", "merge MAP MAP..."]
workson: []
hugoversion: "0.56.0"
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
aliases: []
---
Returns the result of merging two or more maps from left to right. If a key already exists, `merge` updates its value. If a key is absent, `merge` inserts the value under the new key.
@@ -67,5 +63,5 @@ Example 4
```
{{% note %}}
Regardless of depth, merging only applies to maps. For slices, use [append]({{< ref "functions/append" >}}).
Regardless of depth, merging only applies to maps. For slices, use [append](/functions/append).
{{% /note %}}