MCPcopy Create free account
hub / github.com/github/gh-aw / mutableString

Function mutableString

pkg/cli/outcome_eval_update.go:174–190  ·  view source on GitHub ↗
(raw any)

Source from the content-addressed store, hash-verified

172}
173
174func mutableString(raw any) string {
175 switch value := raw.(type) {
176 case string:
177 return value
178 case fmt.Stringer:
179 return value.String()
180 case bool:
181 if value {
182 return "true"
183 }
184 return "false"
185 case nil:
186 return ""
187 default:
188 return strings.TrimSpace(fmt.Sprint(value))
189 }
190}
191
192func mutableBool(raw any) bool {
193 value, ok := raw.(bool)

Callers 4

mutableStateEqualFunction · 0.85
normalizeMutableBodyFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected