aboutsummaryrefslogtreecommitdiff
path: root/internal/auth/smtp
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2023-02-02 21:25:25 +0800
committerGitHub <noreply@github.com>2023-02-02 21:25:25 +0800
commitc53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch)
tree1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/auth/smtp
parent614382fec0ba05149785539ab93560d4d42c194d (diff)
all: replace `interface{}` with `any` (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/auth/smtp')
-rw-r--r--internal/auth/smtp/provider.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/auth/smtp/provider.go b/internal/auth/smtp/provider.go
index 719d1067..cbb91cf5 100644
--- a/internal/auth/smtp/provider.go
+++ b/internal/auth/smtp/provider.go
@@ -34,7 +34,7 @@ func (p *Provider) Authenticate(login, password string) (*auth.ExternalAccount,
if p.config.AllowedDomains != "" {
fields := strings.SplitN(login, "@", 3)
if len(fields) != 2 {
- return nil, auth.ErrBadCredentials{Args: map[string]interface{}{"login": login}}
+ return nil, auth.ErrBadCredentials{Args: map[string]any{"login": login}}
}
domain := fields[1]
@@ -47,7 +47,7 @@ func (p *Provider) Authenticate(login, password string) (*auth.ExternalAccount,
}
if !isAllowed {
- return nil, auth.ErrBadCredentials{Args: map[string]interface{}{"login": login}}
+ return nil, auth.ErrBadCredentials{Args: map[string]any{"login": login}}
}
}
@@ -68,7 +68,7 @@ func (p *Provider) Authenticate(login, password string) (*auth.ExternalAccount,
tperr, ok := err.(*textproto.Error)
if (ok && tperr.Code == 535) ||
strings.Contains(err.Error(), "Username and Password not accepted") {
- return nil, auth.ErrBadCredentials{Args: map[string]interface{}{"login": login}}
+ return nil, auth.ErrBadCredentials{Args: map[string]any{"login": login}}
}
return nil, err
}
@@ -88,7 +88,7 @@ func (p *Provider) Authenticate(login, password string) (*auth.ExternalAccount,
}, nil
}
-func (p *Provider) Config() interface{} {
+func (p *Provider) Config() any {
return p.config
}