(allowedCharset, toCheck string)
| 46 | } |
| 47 | |
| 48 | func validateCharset(allowedCharset, toCheck string) (string, bool) { |
| 49 | invalidRunes := "" |
| 50 | for _, ch := range toCheck { |
| 51 | if !strings.ContainsRune(allowedCharset, ch) { |
| 52 | invalidRunes += string(ch) |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | if invalidRunes == "" { |
| 57 | return "", true |
| 58 | } |
| 59 | return invalidRunes, false |
| 60 | } |
| 61 | |
| 62 | func validateMinLen(typ string, expectedLen int, toCheck string) (*lint.Issue, bool) { |
| 63 | actualLen := len(toCheck) |