MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / stringsToMap2

Function stringsToMap2

agent/app/service/container.go:1636–1645  ·  view source on GitHub ↗
(list []string)

Source from the content-addressed store, hash-verified

1634 return labelMap
1635}
1636func stringsToMap2(list []string) map[string]*string {
1637 var labelMap = make(map[string]*string)
1638 for _, label := range list {
1639 if strings.Contains(label, "=") {
1640 sps := strings.SplitN(label, "=", 2)
1641 labelMap[sps[0]] = &sps[1]
1642 }
1643 }
1644 return labelMap
1645}
1646
1647func calculateCPUPercentUnix(stats *container.StatsResponse) float64 {
1648 cpuPercent := 0.0

Callers 1

ImageBuildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected