MCPcopy Index your code
hub / github.com/helm/helm / configureColorOutput

Function configureColorOutput

pkg/cmd/root.go:137–148  ·  view source on GitHub ↗

configureColorOutput configures the color output based on the ColorMode setting

(settings *cli.EnvSettings)

Source from the content-addressed store, hash-verified

135
136// configureColorOutput configures the color output based on the ColorMode setting
137func configureColorOutput(settings *cli.EnvSettings) {
138 switch settings.ColorMode {
139 case "never":
140 color.NoColor = true
141 case "always":
142 color.NoColor = false
143 case "auto":
144 // Let fatih/color handle automatic detection
145 // It will check if output is a terminal and NO_COLOR env var
146 // We don't need to do anything here
147 }
148}
149
150func newRootCmdWithConfig(actionConfig *action.Configuration, out io.Writer, args []string, logSetup func(bool)) (*cobra.Command, error) {
151 cmd := &cobra.Command{

Callers 1

newRootCmdWithConfigFunction · 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…