Set sets the color configuration
(val string)
| 48 | |
| 49 | // Set sets the color configuration |
| 50 | func (e *colorConfiguration) Set(val string) error { |
| 51 | colorVal := colorConfiguration(val) |
| 52 | switch colorVal { |
| 53 | case colorAlways, colorAuto, colorNever: |
| 54 | *e = colorVal |
| 55 | return nil |
| 56 | default: |
| 57 | return fmt.Errorf("should be one of 'always', 'auto', or 'never'") |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | // Type returns the data type of the flag used for the color configuration |
| 62 | func (e *colorConfiguration) Type() string { |
no test coverage detected