Keepers 99b0f51980
consume prevPath on next backup (#1802)
## Description

Parses the previousPaths metadata collections
along with deltas, and hands paths down to
exchange backup collection producers.  Does
not yet scrutinize previous/current path diffs.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #1726

## Test Plan

- [x]  Unit test
- [x] 💚 E2E
2022-12-16 19:59:34 +00:00

17 lines
371 B
Go

package common
// UnionMaps produces a new map containing all the values of the other
// maps. The last maps have the highes priority. Key collisions with
// earlier maps will favor the last map with that key.
func UnionMaps[K comparable, V any](ms ...map[K]V) map[K]V {
r := map[K]V{}
for _, m := range ms {
for k, v := range m {
r[k] = v
}
}
return r
}