MCPcopy Create free account
hub / github.com/google/pprof / colorize

Function colorize

pprof.go:87–92  ·  view source on GitHub ↗

colorize the msg using ANSI color escapes.

(msg string)

Source from the content-addressed store, hash-verified

85
86// colorize the msg using ANSI color escapes.
87func colorize(msg string) string {
88 var red = 31
89 var colorEscape = fmt.Sprintf("\033[0;%dm", red)
90 var colorResetEscape = "\033[0m"
91 return colorEscape + msg + colorResetEscape
92}
93
94// IsTerminal returns whether the UI is known to be tied to an
95// interactive terminal (as opposed to being redirected to a file).

Callers 1

PrintErrMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…