refactor: add default for auth_type

This commit is contained in:
Derrick Hammer 2024-03-15 07:39:43 -04:00
parent cafe863350
commit 86c53d3c54
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 1 deletions

View File

@ -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",
}
}