(section string)
| 46 | } |
| 47 | |
| 48 | func (v *Validator) HasError(section string) bool { |
| 49 | for _, err := range v.Errors { |
| 50 | if err.Section == section { |
| 51 | return true |
| 52 | } |
| 53 | } |
| 54 | return false |
| 55 | } |
| 56 | |
| 57 | func When(condition bool, callback ValidatorCallback) ValidatorCallback { |
| 58 | if condition { |
no outgoing calls
no test coverage detected