(username string)
| 306 | } |
| 307 | |
| 308 | func isUsernameValid(username string) bool { |
| 309 | // assuming valid usernames are alphanumeric, with these special characters allowed: . _ - |
| 310 | var validUsernamePattern = `^[a-zA-Z0-9_][-.a-zA-Z0-9_]*$` |
| 311 | re := regexp.MustCompile(validUsernamePattern) |
| 312 | return re.MatchString(username) |
| 313 | } |
no outgoing calls
no test coverage detected