1
0
mirror of https://github.com/containrrr/watchtower.git synced 2025-02-07 19:30:19 +02:00

fix some var ref errors

This commit is contained in:
Simon Aronsson 2019-11-17 11:19:57 +01:00
parent 6910ad8c4e
commit ea596ea747
3 changed files with 13 additions and 12 deletions

1
go.mod
View File

@ -59,7 +59,6 @@ require (
golang.org/x/crypto v0.0.0-20190403202508-8e1b8d32e692
golang.org/x/net v0.0.0-20190522155817-f3200d17e092
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/grpc v1.21.0
gotest.tools v2.2.0+incompatible // indirect

View File

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