diff --git a/cmd/authelia-scripts/cmd_docker.go b/cmd/authelia-scripts/cmd_docker.go index 76184d69..d7d7833d 100644 --- a/cmd/authelia-scripts/cmd_docker.go +++ b/cmd/authelia-scripts/cmd_docker.go @@ -46,7 +46,7 @@ func dockerBuildOfficialImage(arch string) error { // Set default Architecture Dockerfile to amd64. dockerfile := "Dockerfile" // Set version of QEMU. - qemuversion := "v5.0.0-2" + qemuversion := "v5.1.0-2" // If not the default value. if arch != defaultArch { diff --git a/cmd/authelia-scripts/main.go b/cmd/authelia-scripts/main.go index 44905e3f..21359522 100755 --- a/cmd/authelia-scripts/main.go +++ b/cmd/authelia-scripts/main.go @@ -1,5 +1,5 @@ //usr/bin/env go run "$0" "$@"; exit -//nolint:godot +//nolint:gocritic,godot package main diff --git a/internal/authentication/file_user_provider_test.go b/internal/authentication/file_user_provider_test.go index 2d15c7fb..8c5fc7c0 100644 --- a/internal/authentication/file_user_provider_test.go +++ b/internal/authentication/file_user_provider_test.go @@ -20,17 +20,17 @@ func WithDatabase(content []byte, f func(path string)) { log.Fatal(err) } - defer os.Remove(tmpfile.Name()) // clean up + defer os.Remove(tmpfile.Name()) // Clean up if _, err := tmpfile.Write(content); err != nil { tmpfile.Close() - log.Fatal(err) + log.Panic(err) } f(tmpfile.Name()) if err := tmpfile.Close(); err != nil { - log.Fatal(err) + log.Panic(err) } } diff --git a/internal/configuration/validator/authentication.go b/internal/configuration/validator/authentication.go index 6ac166ea..b11354f1 100644 --- a/internal/configuration/validator/authentication.go +++ b/internal/configuration/validator/authentication.go @@ -39,7 +39,7 @@ func validateFileAuthenticationBackend(configuration *schema.FileAuthenticationB validator.Push(fmt.Errorf("The number of iterations specified is invalid, must be 1 or more, you configured %d", configuration.Password.Iterations)) } - //Salt Length + // Salt Length switch { case configuration.Password.SaltLength == 0: configuration.Password.SaltLength = schema.DefaultPasswordConfiguration.SaltLength diff --git a/internal/configuration/validator/secrets.go b/internal/configuration/validator/secrets.go index 7ae64575..cd630580 100644 --- a/internal/configuration/validator/secrets.go +++ b/internal/configuration/validator/secrets.go @@ -55,7 +55,7 @@ func getSecretValue(name string, validator *schema.StructValidator, viper *viper if err != nil { validator.Push(fmt.Errorf("error loading secret file (%s): %s", name, err)) } else { - return strings.Replace(string(content), "\n", "", -1) + return strings.ReplaceAll(string(content), "\n", "") } } diff --git a/internal/handlers/handler_verify_test.go b/internal/handlers/handler_verify_test.go index a48fbd50..9f03dedb 100644 --- a/internal/handlers/handler_verify_test.go +++ b/internal/handlers/handler_verify_test.go @@ -913,7 +913,6 @@ func TestShouldGetRemovedUserGroupsFromBackend(t *testing.T) { func TestShouldGetAddedUserGroupsFromBackend(t *testing.T) { mock := mocks.NewMockAutheliaCtx(t) - //defer mock.Close() // Setup pointer to john so we can adjust it during the test. user := &authentication.UserDetails{ diff --git a/internal/notification/smtp_notifier.go b/internal/notification/smtp_notifier.go index 1a1642df..a40cf310 100644 --- a/internal/notification/smtp_notifier.go +++ b/internal/notification/smtp_notifier.go @@ -58,7 +58,7 @@ func (n *SMTPNotifier) initializeTLSConfig() { // The second part of this check happens in the Configure Cert Pool code block log.Debug("Notifier SMTP client initializing TLS configuration") - //Configure Cert Pool + // Configure Cert Pool certPool, err := x509.SystemCertPool() if err != nil || certPool == nil { certPool = x509.NewCertPool() diff --git a/internal/storage/sql_provider_test.go b/internal/storage/sql_provider_test.go index 53957b9c..6e235b55 100644 --- a/internal/storage/sql_provider_test.go +++ b/internal/storage/sql_provider_test.go @@ -270,7 +270,7 @@ func TestSQLProviderMethodsTOTP(t *testing.T) { WithArgs(args...). WillReturnRows(sqlmock.NewRows([]string{"secret"})) - //Test Blank Rows + // Test Blank Rows secret, err = provider.LoadTOTPSecret(unitTestUser) assert.EqualError(t, err, "No TOTP secret registered") assert.Equal(t, "", secret)