MCPcopy Create free account
hub / github.com/cloudfoundry/cli / formatDescription

Function formatDescription

actor/v7action/event.go:80–89  ·  view source on GitHub ↗
(metadata generic.Map, keys []string)

Source from the content-addressed store, hash-verified

78}
79
80func formatDescription(metadata generic.Map, keys []string) string {
81 parts := []string{}
82 for _, key := range keys {
83 value := metadata.Get(key)
84 if value != nil {
85 parts = append(parts, fmt.Sprintf("%s: %s", key, formatDescriptionPart(value)))
86 }
87 }
88 return strings.Join(parts, ", ")
89}
90
91func formatDescriptionPart(val interface{}) string {
92 switch val := val.(type) {

Callers 1

generateDescriptionFunction · 0.70

Calls 2

formatDescriptionPartFunction · 0.70
GetMethod · 0.65

Tested by

no test coverage detected