From d4bf2ca8d186d7370344b129dccf358a905f7ee8 Mon Sep 17 00:00:00 2001 From: Timothy Date: Mon, 6 Nov 2017 17:53:11 +0800 Subject: [PATCH] fix golint warnings --- settings.go | 1 + template.go | 2 +- utils.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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