ficsit-cli-flake/utils/structures.go
2022-05-02 23:07:15 +03:00

9 lines
150 B
Go

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
}