(f Flag)
| 408 | } |
| 409 | |
| 410 | func (cmd *Command) checkRequiredFlag(f Flag) (bool, string) { |
| 411 | if rf, ok := f.(RequiredFlag); ok && rf.IsRequired() { |
| 412 | flagName := f.Names()[0] |
| 413 | if !f.IsSet() { |
| 414 | return false, flagName |
| 415 | } |
| 416 | } |
| 417 | return true, "" |
| 418 | } |
| 419 | |
| 420 | func (cmd *Command) checkAllRequiredFlags() requiredFlagsErr { |
| 421 | // The help and completion commands are allowed to run without |
no test coverage detected