ficsit-cli-flake/utils/structures.go

10 lines
150 B
Go
Raw Normal View History

2022-05-02 20:07:15 +00:00
package utils
func CopyMap[T comparable, M any](m map[T]M) map[T]M {
m2 := make(map[T]M, len(m))
for k, v := range m {
m2[k] = v
}
return m2
}