Skip to main content

MergeMaps

Merges all source maps into the destination map in order.

def MergeMaps(
dst: map[string]string,
src: ...map[string]string
)

Merges all source maps into the destination map in the order they are provided. This function is used to combine multiple maps into a single map, with later maps overwriting values for duplicate keys from earlier maps.

Parameters

NameTypeDescription
dstmap[string]stringThe destination map where all key-value pairs from the source maps will be merged. This map will be modified in place.
src...map[string]stringOne or more source maps whose key-value pairs will be merged into the destination map. If multiple source maps contain the same key, the value from the later map in the sequence will overwrite previous values.