MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / buildSection

Function buildSection

util/archive_builder.go:198–207  ·  view source on GitHub ↗
(elements map[string]string, locatorName string)

Source from the content-addressed store, hash-verified

196}
197
198func buildSection(elements map[string]string, locatorName string) []ManifestSection {
199 result := make([]ManifestSection, 0)
200 for key, value := range concatenateElementsWithSameValue(elements) {
201 manifestSectionBuilder := NewMtaManifestSectionBuilder()
202 manifestSectionBuilder.Name(key)
203 manifestSectionBuilder.Attribute(locatorName, strings.Join(value, ","))
204 result = append(result, manifestSectionBuilder.Build())
205 }
206 return result
207}
208
209func concatenateElementsWithSameValue(elements map[string]string) map[string][]string {
210 result := make(map[string][]string)

Callers 1

BuildMethod · 0.85

Calls 5

NameMethod · 0.95
AttributeMethod · 0.95
BuildMethod · 0.95

Tested by

no test coverage detected