MCPcopy Create free account
hub / github.com/containerd/cgroups / parseKV

Function parseKV

cgroup2/utils.go:98–105  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

96}
97
98func parseKV(raw string) (string, uint64, error) {
99 parts := strings.Fields(raw)
100 if len(parts) != 2 {
101 return "", 0, ErrInvalidFormat
102 }
103 v, err := parseUint(parts[1], 10, 64)
104 return parts[0], v, err
105}
106
107func parseUint(s string, base, bitSize int) (uint64, error) {
108 v, err := strconv.ParseUint(s, base, bitSize)

Callers 2

readKVStatsFileFunction · 0.70

Calls 1

parseUintFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…