func validateUsername(u string) error {
	switch {
	case len(u) < 1:
		return fmt.Errorf("username required")
	case len(u) > 32:
		return fmt.Errorf("username must be less than 32 characters long")
	default:
		for _, r := range u {
			if !unicode.IsLower(r) {
				return fmt.Errorf("username must be made of only lowercase letters")
			}
		}
	}
	return nil
}
// validateUsername returns an error if the username is not valid.
validateUsername returns an error if the username is not valid.
// validateUsername returns an error if the username is not valid .
func validateUsername(u string) error {
	switch {
	case len(u) < 1:
		return fmt.Errorf("username required")
	case len(u) > 32:
		return fmt.Errorf("username must be less than 32 characters long")
	default:
		for _, r := range u {
			if !unicode.IsLower(r) {
				return fmt.Errorf("username must be made of only lowercase letters")
			}
		}
	}
	return nil
}
func validateUsername ( u string ) error { switch { case len ( u ) < 1 : return fmt . Errorf ( " " ) case len ( u ) > 32 : return fmt . Errorf ( " " ) default : for _ , r := range u { if ! unicode . IsLower ( r ) { return fmt . Errorf ( " " ) } } } return nil }
validateUsername returns an error if the username is not valid.
validateUsername returns an error if the username is not valid .