mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
fix linting
This commit is contained in:
parent
3b244d673b
commit
3ef57385ec
6 changed files with 24 additions and 54 deletions
|
@ -811,12 +811,12 @@ func ValidateUser(u *User, cols ...string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (user User) Validate() []string {
|
||||
func (u User) Validate() []string {
|
||||
var result []string
|
||||
if err := ValidateUser(&user); err != nil {
|
||||
if err := ValidateUser(&u); err != nil {
|
||||
result = append(result, err.Error())
|
||||
}
|
||||
if err := ValidateEmail(user.Email); err != nil {
|
||||
if err := ValidateEmail(u.Email); err != nil {
|
||||
result = append(result, err.Error())
|
||||
}
|
||||
return result
|
||||
|
|
|
@ -65,7 +65,7 @@ func FindFederatedUser(ctx context.Context, externalID string,
|
|||
if err != nil {
|
||||
return nil, nil, err
|
||||
} else if !has {
|
||||
return nil, nil, fmt.Errorf("User %v for federated user is missing.", federatedUser.UserID)
|
||||
return nil, nil, fmt.Errorf("User %v for federated user is missing", federatedUser.UserID)
|
||||
}
|
||||
|
||||
if res, err := validation.IsValid(*user); !res {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue