Skip to content

Commit

Permalink
Merge pull request #430 from atc0005/fix-revive-linting-errors
Browse files Browse the repository at this point in the history
Fix `if-return`, `unused-parameter` linting errors
  • Loading branch information
atc0005 authored May 5, 2023
2 parents 5956411 + 60ae804 commit 0b2c108
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/check_imap_mailbox_basic/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

func processAccount(
ctx context.Context,
_ context.Context,
account config.MailAccount,
cfg *config.Config,
state *nagios.Plugin,
Expand Down
7 changes: 1 addition & 6 deletions internal/config/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions internal/config/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 0b2c108

Please sign in to comment.