Handle optionnal flags
This commit is contained in:
parent
e581630d5e
commit
a414cd22c8
18 changed files with 68 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue