mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-06-13 05:42:16 +02:00
fix remaining lint warnings
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
ad75543172
commit
410b7cd512
|
@ -276,15 +276,15 @@ func (c *Config) Initialize(configDir string, isService bool) error {
|
|||
}
|
||||
|
||||
func (c *Config) getMailClientOptions() []mail.Option {
|
||||
options := []mail.Option{mail.WithPort(c.Port), mail.WithoutNoop()}
|
||||
options := []mail.Option{mail.WithoutNoop()}
|
||||
|
||||
switch c.Encryption {
|
||||
case 1:
|
||||
options = append(options, mail.WithSSL())
|
||||
options = append(options, mail.WithSSLPort(false))
|
||||
case 2:
|
||||
options = append(options, mail.WithTLSPolicy(mail.TLSMandatory))
|
||||
options = append(options, mail.WithTLSPortPolicy(mail.TLSMandatory))
|
||||
default:
|
||||
options = append(options, mail.WithTLSPolicy(mail.NoTLS))
|
||||
options = append(options, mail.WithTLSPortPolicy(mail.NoTLS))
|
||||
}
|
||||
if c.User != "" {
|
||||
options = append(options, mail.WithUsername(c.User))
|
||||
|
@ -314,6 +314,7 @@ func (c *Config) getMailClientOptions() []mail.Option {
|
|||
}),
|
||||
mail.WithDebugLog())
|
||||
}
|
||||
options = append(options, mail.WithPort(c.Port))
|
||||
return options
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue