Make --color and --no-color exclusive

Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
Yusuke Kuoka
2022-04-13 23:43:41 +00:00
parent 97e0ca73ca
commit f84ab66ba0
2 changed files with 19 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
package app
import "errors"
func ValidateConfig(conf ApplyConfigProvider) error {
if conf.NoColor() && conf.Color() {
return errors.New("--color and --no-color cannot be specified at the same time")
}
return nil
}