NoColorOutput returns true if the output produced should not contain colors, which is useful when a terminal or medium can't interpret ANSI colors
(ctx context.Context)
| 219 | // NoColorOutput returns true if the output produced should not contain colors, which is |
| 220 | // useful when a terminal or medium can't interpret ANSI colors |
| 221 | func NoColorOutput(ctx context.Context) bool { |
| 222 | noColors, ok := ctx.Value(NoColors).(bool) |
| 223 | |
| 224 | return ok && noColors |
| 225 | } |
| 226 | |
| 227 | func Testing(ctx context.Context) *testing.T { |
| 228 | return ctx.Value(TestingT).(*testing.T) |
no outgoing calls