MCPcopy Index your code
hub / github.com/cloudfoundry/cli / formatDescriptionPart

Function formatDescriptionPart

cf/api/resources/events.go:96–110  ·  view source on GitHub ↗
(val interface{})

Source from the content-addressed store, hash-verified

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

Callers 1

formatDescriptionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected