MCPcopy Index your code
hub / github.com/cheat/cheat / Faint

Function Faint

internal/display/faint.go:9–17  ·  view source on GitHub ↗

Faint returns a faintly-colored string that's used to de-prioritize text written to stdout

(str string, colorize bool)

Source from the content-addressed store, hash-verified

7// Faint returns a faintly-colored string that's used to de-prioritize text
8// written to stdout
9func Faint(str string, colorize bool) string {
10 // make `str` faint only if colorization has been requested
11 if colorize {
12 return fmt.Sprintf("\033[2m%s\033[0m", str)
13 }
14
15 // otherwise, return the string unmodified
16 return str
17}

Callers 3

cmdViewFunction · 0.92
cmdSearchFunction · 0.92
TestFaintFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFaintFunction · 0.68