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

Function stringsToMap

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

Source from the content-addressed store, hash-verified

1624}
1625
1626func stringsToMap(list []string) map[string]string {
1627 var labelMap = make(map[string]string)
1628 for _, label := range list {
1629 if strings.Contains(label, "=") {
1630 sps := strings.SplitN(label, "=", 2)
1631 labelMap[sps[0]] = sps[1]
1632 }
1633 }
1634 return labelMap
1635}
1636func stringsToMap2(list []string) map[string]*string {
1637 var labelMap = make(map[string]*string)
1638 for _, label := range list {

Callers 4

CreateVolumeMethod · 0.85
ImageBuildMethod · 0.85
CreateNetworkMethod · 0.85
loadConfigInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected