Handle optionnal flags

This commit is contained in:
nemunaire 2022-05-31 22:03:51 +02:00
commit a414cd22c8
18 changed files with 68 additions and 22 deletions

View file

@ -167,6 +167,11 @@ func (k *FlagLabel) GetDepends() ([]Flag, error) {
return deps, nil
}
// IsOptionnal to know if the flag can be omitted when validating the step.
func (k *FlagLabel) IsOptionnal() bool {
return true
}
// Check if the given val is the expected one for this flag.
func (k *FlagLabel) Check(v interface{}) int {
return 0