* Update Go version to v1.23.7

* Bump golangci-lint to a version supporting Go 1.23

* Fix golangci-lint warnings

Several rules from gosimple, revive and staticcheck linters were
failing:
- Redefinition of built-in identifiers (max, min, new, recover...)
- Use of printf-like functions with simple strings
- Check for nil slices, when len already takes it into account

* Trigger Build

* Trigger Build

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Alejandro García Montoro
2025-03-17 14:22:07 +01:00
коммит произвёл GitHub
родитель 33d207d81a
Коммит 350714f390
23 изменённых файлов: 45 добавлений и 49 удалений

Просмотреть файл

@@ -339,8 +339,8 @@ func (a *App) MFARequired(rctx request.CTX) *model.AppError {
return nil
}
func checkUserLoginAttempts(user *model.User, max int) *model.AppError {
if user.FailedAttempts >= max {
func checkUserLoginAttempts(user *model.User, maxAttempts int) *model.AppError {
if user.FailedAttempts >= maxAttempts {
if user.AuthService == model.UserAuthServiceLdap {
return model.NewAppError("checkUserLoginAttempts", "api.user.check_user_login_attempts.too_many_ldap.app_error", nil, "user_id="+user.Id, http.StatusUnauthorized)
}