mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
chore: reduce memory usage of docker container info
This commit is contained in:
9
internal/utils/maps.go
Normal file
9
internal/utils/maps.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package utils
|
||||
|
||||
func FitMap[K comparable, V any](m map[K]V) map[K]V {
|
||||
res := make(map[K]V, len(m))
|
||||
for k, v := range m {
|
||||
res[k] = v
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user