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