chore: reduce memory usage of docker container info

This commit is contained in:
yusing
2025-04-10 04:56:50 +08:00
parent 49ee9c908a
commit 5d2b700cb2
3 changed files with 25 additions and 15 deletions

9
internal/utils/maps.go Normal file
View 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
}