MCPcopy Create free account
hub / github.com/cli/cli / printOutput

Function printOutput

script/ghmock/report.go:195–206  ·  view source on GitHub ↗
(w io.Writer, label, text string)

Source from the content-addressed store, hash-verified

193}
194
195func printOutput(w io.Writer, label, text string) {
196 fmt.Fprintf(w, "--- %s\n", label)
197 if text == "" {
198 fmt.Fprintln(w, "(empty)")
199 return
200 }
201 text = showEscapes(text)
202 fmt.Fprint(w, text)
203 if !strings.HasSuffix(text, "\n") {
204 fmt.Fprintln(w)
205 }
206}
207
208// showEscapes writes the escape character as \e, so color codes such as
209// \e[33m stay visible in reports and a missing reset can be spotted.

Callers 1

printResultFunction · 0.85

Calls 1

showEscapesFunction · 0.85

Tested by

no test coverage detected