1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 21:45:43 +01:00
Files
glusterd2/pkg/api/utils.go

15 lines
305 B
Go
Raw Permalink Normal View History

package api
import "strings"
// mapSize calculates and returns the size of the map passed as parameter in bytes
func mapSize(metadata map[string]string) int {
size := 0
for key, value := range metadata {
if !strings.HasPrefix(key, "_") {
size = size + len(key) + len(value)
}
}
return size
}