(typ string, expectedLen int, toCheck string)
| 76 | } |
| 77 | |
| 78 | func validateMaxLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) { |
| 79 | if expectedLen < 0 { |
| 80 | return nil, true |
| 81 | } |
| 82 | |
| 83 | if len(toCheck) <= expectedLen { |
| 84 | return nil, true |
| 85 | } |
| 86 | |
| 87 | desc := formMaxLenDesc(typ, len(toCheck), expectedLen) |
| 88 | return lint.NewIssue(desc), false |
| 89 | } |
| 90 | |
| 91 | func validateMaxLineLength(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) { |
| 92 | lines := strings.Split(toCheck, "\n") |