refactor: add default for auth_type
This commit is contained in:
parent
cafe863350
commit
86c53d3c54
|
@ -1,8 +1,11 @@
|
|||
package config
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
var _ Validator = (*MailConfig)(nil)
|
||||
var _ Defaults = (*MailConfig)(nil)
|
||||
|
||||
type MailConfig struct {
|
||||
Host string `mapstructure:"host"`
|
||||
|
@ -29,3 +32,8 @@ func (m MailConfig) Validate() error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (c MailConfig) Defaults() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"auth_type": "plain",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue