From 86c53d3c5452826c992a6b529f7c0d22f450a853 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 15 Mar 2024 07:39:43 -0400 Subject: [PATCH] refactor: add default for auth_type --- config/mail.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/mail.go b/config/mail.go index 35dd845..87fa8a0 100644 --- a/config/mail.go +++ b/config/mail.go @@ -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", + } +}