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

Function formatDescriptionPart

actor/v7action/event.go:91–105  ·  view source on GitHub ↗
(val interface{})

Source from the content-addressed store, hash-verified

89}
90
91func formatDescriptionPart(val interface{}) string {
92 switch val := val.(type) {
93 case string:
94 return val
95 case float64:
96 return strconv.FormatFloat(val, byte('f'), -1, 64)
97 case bool:
98 if val {
99 return "true"
100 }
101 return "false"
102 default:
103 return fmt.Sprintf("%s", val)
104 }
105}

Callers 1

formatDescriptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected