diff --git a/cmd/check_imap_mailbox_basic/process.go b/cmd/check_imap_mailbox_basic/process.go index 1ec9fbfd..70806fb8 100644 --- a/cmd/check_imap_mailbox_basic/process.go +++ b/cmd/check_imap_mailbox_basic/process.go @@ -18,7 +18,7 @@ import ( ) func processAccount( - ctx context.Context, + _ context.Context, account config.MailAccount, cfg *config.Config, state *nagios.Plugin, diff --git a/internal/config/logging.go b/internal/config/logging.go index b8677f5c..982a7dfc 100644 --- a/internal/config/logging.go +++ b/internal/config/logging.go @@ -201,10 +201,5 @@ func (c *Config) setupLogging(appType AppType) error { } - if err := setLoggingLevel(c.LoggingLevel); err != nil { - return err - } - - return nil - + return setLoggingLevel(c.LoggingLevel) } diff --git a/internal/config/validate.go b/internal/config/validate.go index 3ee141e7..b9b3bb03 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -56,7 +56,7 @@ func validateLoggingLevels(c Config) error { // validateAccountBasicAuthFields is responsible for validating MailAccount // fields specific to the Basic Authentication type. The caller is responsible // for calling this function for the appropriate application type. -func validateAccountBasicAuthFields(account MailAccount, appType AppType) error { +func validateAccountBasicAuthFields(account MailAccount, _ AppType) error { if account.Username == "" { return fmt.Errorf("username not provided for account %s", account.Name, @@ -76,7 +76,7 @@ func validateAccountBasicAuthFields(account MailAccount, appType AppType) error // MailAccount fields specific to the OAuth2 Client Credentials Flow // authentication type. The caller is responsible for calling this function // for the appropriate application type. -func validateAccountOAuth2ClientCredsAuthFields(account MailAccount, appType AppType) error { +func validateAccountOAuth2ClientCredsAuthFields(account MailAccount, _ AppType) error { if account.OAuth2Settings.ClientID == "" { return fmt.Errorf("client ID not provided for account %s", account.Name,