Rename parameter for consistency in auth functions

Updated the parameter name `allowUnEnc` to `allowUnenc` in both `LoginAuth` and `PlainAuth` functions to maintain consistent naming conventions. This change improves code readability and follows standard naming practices.
This commit is contained in:
Winni Neessen 2024-11-07 20:58:20 +01:00
parent e42b022076
commit 2391010e3a
Signed by: wneessen
GPG key ID: 385AC9889632126E
2 changed files with 4 additions and 4 deletions

View file

@ -36,8 +36,8 @@ type loginAuth struct {
// LoginAuth will only send the credentials if the connection is using TLS // LoginAuth will only send the credentials if the connection is using TLS
// or is connected to localhost. Otherwise authentication will fail with an // or is connected to localhost. Otherwise authentication will fail with an
// error, without sending the credentials. // error, without sending the credentials.
func LoginAuth(username, password, host string, allowUnEnc bool) Auth { func LoginAuth(username, password, host string, allowUnenc bool) Auth {
return &loginAuth{username, password, host, 0, allowUnEnc} return &loginAuth{username, password, host, 0, allowUnenc}
} }
// Start begins the SMTP authentication process by validating server's TLS status and hostname. // Start begins the SMTP authentication process by validating server's TLS status and hostname.

View file

@ -28,8 +28,8 @@ type plainAuth struct {
// PlainAuth will only send the credentials if the connection is using TLS // PlainAuth will only send the credentials if the connection is using TLS
// or is connected to localhost. Otherwise authentication will fail with an // or is connected to localhost. Otherwise authentication will fail with an
// error, without sending the credentials. // error, without sending the credentials.
func PlainAuth(identity, username, password, host string, allowUnEnc bool) Auth { func PlainAuth(identity, username, password, host string, allowUnenc bool) Auth {
return &plainAuth{identity, username, password, host, allowUnEnc} return &plainAuth{identity, username, password, host, allowUnenc}
} }
func (a *plainAuth) Start(server *ServerInfo) (string, []byte, error) { func (a *plainAuth) Start(server *ServerInfo) (string, []byte, error) {