diff --git a/settings.go b/settings.go index fd3cf1f..c287628 100644 --- a/settings.go +++ b/settings.go @@ -12,6 +12,7 @@ type Domain struct { SubDomains []string `json:"sub_domains"` } +// Notify struct for SMTP notification type Notify struct { Enabled bool `json:"enabled"` SMTPServer string `json:"smtp_server"` diff --git a/template.go b/template.go index d6c433a..9b66792 100644 --- a/template.go +++ b/template.go @@ -1,6 +1,6 @@ package godns -var MailTemplate = ` +var mailTemplate = `
diff --git a/utils.go b/utils.go index 737165f..779241c 100644 --- a/utils.go +++ b/utils.go @@ -129,7 +129,7 @@ func SendNotify(configuration *Settings, domain, currentIP string) error { func buildTemplate(currentIP, domain string) string { t := template.New("notification template") - t.Parse(MailTemplate) + t.Parse(mailTemplate) data := struct { CurrentIP string