From f188c9883b91ef27b5818db7c4534f9202ba0d6c Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 10 Sep 2018 23:21:36 -0400 Subject: [PATCH] Remove defaults for Greeting/Signature --- default.go | 7 ++++++- flat.go | 6 +++++- hermes.go | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/default.go b/default.go index b8e2e94..14dabc1 100644 --- a/default.go +++ b/default.go @@ -387,11 +387,13 @@ func (dt *Default) HTMLTemplate() string { {{ end }} {{ end }} + {{ if .Email.Body.Signature }}

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}}

+ {{ end }} {{ if (eq .Email.Body.FreeMarkdown "") }} {{ with .Email.Body.Actions }} @@ -488,7 +490,10 @@ func (dt *Default) PlainTextTemplate() string {

{{ $line }}

{{ end }} {{ end }} -

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}

+{{if .Email.Body.Signature }} +

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}

+{{ end }} +

{{.Hermes.Product.Copyright}}

` diff --git a/flat.go b/flat.go index 955a568..6937202 100644 --- a/flat.go +++ b/flat.go @@ -387,11 +387,13 @@ func (dt *Flat) HTMLTemplate() string { {{ end }} {{ end }} + {{ if .Email.Body.Signature }}

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}}

+ {{ end }} {{ if (eq .Email.Body.FreeMarkdown "") }} {{ with .Email.Body.Actions }} @@ -488,7 +490,9 @@ func (dt *Flat) PlainTextTemplate() string {

{{ $line }}

{{ end }} {{ end }} -

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}

+{{if .Email.Body.Signature }} +

{{.Email.Body.Signature}},
{{.Hermes.Product.Name}} - {{.Hermes.Product.Link}}

+{{ end }}

{{.Hermes.Product.Copyright}}

` diff --git a/hermes.go b/hermes.go index 6848ef4..46a79c4 100644 --- a/hermes.go +++ b/hermes.go @@ -124,8 +124,8 @@ func setDefaultEmailValues(e *Email) error { Intros: []string{}, Dictionary: []Entry{}, Outros: []string{}, - Signature: "Yours truly", - Greeting: "Hi", + Signature: "", + Greeting: "", }, } // Merge the given email with default one