(message string, conditions ...bool)
| 45 | } |
| 46 | |
| 47 | func MutuallyExclusive(message string, conditions ...bool) error { |
| 48 | numTrue := 0 |
| 49 | for _, ok := range conditions { |
| 50 | if ok { |
| 51 | numTrue++ |
| 52 | } |
| 53 | } |
| 54 | if numTrue > 1 { |
| 55 | return FlagErrorf("%s", message) |
| 56 | } |
| 57 | return nil |
| 58 | } |
| 59 | |
| 60 | type NoResultsError struct { |
| 61 | message string |
no test coverage detected