fix some var ref errors

pull/421/head
Simon Aronsson 5 years ago
parent 6910ad8c4e
commit ea596ea747

@ -59,7 +59,6 @@ require (
golang.org/x/crypto v0.0.0-20190403202508-8e1b8d32e692 golang.org/x/crypto v0.0.0-20190403202508-8e1b8d32e692
golang.org/x/net v0.0.0-20190522155817-f3200d17e092 golang.org/x/net v0.0.0-20190522155817-f3200d17e092
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20190401181712-f467c93bbac2 google.golang.org/genproto v0.0.0-20190401181712-f467c93bbac2
google.golang.org/grpc v1.21.0 google.golang.org/grpc v1.21.0
gotest.tools v2.2.0+incompatible // indirect gotest.tools v2.2.0+incompatible // indirect

@ -64,10 +64,12 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie
} }
func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte {
if SubjectTag == "" { var emailSubject string
emailSubject := "Watchtower updates"
if e.SubjectTag == "" {
emailSubject = "Watchtower updates"
} else { } else {
emailSubject := SubjectTag + " Watchtower updates" emailSubject = e.SubjectTag + " Watchtower updates"
} }
if hostname, err := os.Hostname(); err == nil { if hostname, err := os.Hostname(); err == nil {
emailSubject += " on " + hostname emailSubject += " on " + hostname

Loading…
Cancel
Save