(typ string, expectedLen int, toCheck string)
| 70 | } |
| 71 | |
| 72 | func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) { |
| 73 | if expectedLen < 0 { |
| 74 | return nil, true |
| 75 | } |
| 76 | |
| 77 | if len(toCheck) <= expectedLen { |
| 78 | return nil, true |
| 79 | } |
| 80 | |
| 81 | desc := formMaxLenDesc(typ, len(toCheck), expectedLen) |
| 82 | return lint.NewIssue(desc), false |
| 83 | } |
| 84 | |
| 85 | func validateMaxLineLength(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) { |
| 86 | if expectedLen < 0 || toCheck == "" { |