MCPcopy Index your code
hub / github.com/coder/coder / ifTerm

Function ifTerm

cli/cliui/cliui.go:117–122  ·  view source on GitHub ↗
(fmt pretty.Formatter)

Source from the content-addressed store, hash-verified

115}
116
117func ifTerm(fmt pretty.Formatter) pretty.Formatter {
118 if !isTerm() {
119 return pretty.Nop
120 }
121 return fmt
122}
123
124func init() {
125 // We do not adapt the color based on whether the terminal is light or dark.

Callers 1

initFunction · 0.85

Calls 1

isTermFunction · 0.85

Tested by

no test coverage detected