(text string, colorPrinter *color.Color)
| 486 | } |
| 487 | |
| 488 | func (ui *UI) modifyColor(text string, colorPrinter *color.Color) string { |
| 489 | if len(text) == 0 { |
| 490 | return text |
| 491 | } |
| 492 | |
| 493 | switch ui.colorEnabled { |
| 494 | case configv3.ColorEnabled: |
| 495 | colorPrinter.EnableColor() |
| 496 | case configv3.ColorDisabled: |
| 497 | colorPrinter.DisableColor() |
| 498 | } |
| 499 | |
| 500 | return colorPrinter.SprintFunc()(text) |
| 501 | } |
| 502 | |
| 503 | // getFirstSet returns the first map if 1 or more maps are provided. Otherwise |
| 504 | // it returns the empty map. |
no outgoing calls
no test coverage detected