diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-02 21:25:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:25:25 +0800 |
commit | c53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch) | |
tree | 1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/auth/smtp | |
parent | 614382fec0ba05149785539ab93560d4d42c194d (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.go | 8 |
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 } |