MCPcopy
hub / github.com/docker/compose / SetANSIMode

Function SetANSIMode

cmd/formatter/colors.go:66–73  ·  view source on GitHub ↗

SetANSIMode configure formatter for colored output on ANSI-compliant console

(streams command.Streams, ansi string)

Source from the content-addressed store, hash-verified

64
65// SetANSIMode configure formatter for colored output on ANSI-compliant console
66func SetANSIMode(streams command.Streams, ansi string) {
67 if !useAnsi(streams, ansi) {
68 nextColor = func() colorFunc {
69 return monochrome
70 }
71 disableAnsi = true
72 }
73}
74
75func useAnsi(streams command.Streams, ansi string) bool {
76 switch ansi {

Callers 1

RootCommandFunction · 0.92

Calls 1

useAnsiFunction · 0.85

Tested by

no test coverage detected