From b1e146b702ee9172775f027e7f94c52e6b0a2c75 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Mon, 21 Sep 2015 15:39:29 -0700 Subject: [PATCH] email: Remove unused ID field --- email/interface.go | 3 +-- email/mailgun.go | 3 +-- email/smtp.go | 3 +-- static/fixtures/emailer.json.sample | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/email/interface.go b/email/interface.go index 5ab5afd0..05b9ed92 100644 --- a/email/interface.go +++ b/email/interface.go @@ -65,7 +65,6 @@ func NewEmailerConfigFromFile(loc string) (EmailerConfig, error) { } type FakeEmailerConfig struct { - ID string `json:"id"` } func (cfg FakeEmailerConfig) EmailerType() string { @@ -73,7 +72,7 @@ func (cfg FakeEmailerConfig) EmailerType() string { } func (cfg FakeEmailerConfig) EmailerID() string { - return cfg.ID + return FakeEmailerType } func (cfg FakeEmailerConfig) Emailer() (Emailer, error) { diff --git a/email/mailgun.go b/email/mailgun.go index ee604853..8dd121ce 100644 --- a/email/mailgun.go +++ b/email/mailgun.go @@ -17,7 +17,6 @@ func init() { } type MailgunEmailerConfig struct { - ID string `json:"id"` PrivateAPIKey string `json:"privateAPIKey"` PublicAPIKey string `json:"publicAPIKey"` Domain string `json:"domain"` @@ -28,7 +27,7 @@ func (cfg MailgunEmailerConfig) EmailerType() string { } func (cfg MailgunEmailerConfig) EmailerID() string { - return cfg.ID + return MailgunEmailerType } func (cfg MailgunEmailerConfig) Emailer() (Emailer, error) { diff --git a/email/smtp.go b/email/smtp.go index 3d5aa175..b8568ead 100644 --- a/email/smtp.go +++ b/email/smtp.go @@ -16,7 +16,6 @@ func init() { } type SmtpEmailerConfig struct { - ID string `json:"id"` Host string `json:"host"` Port int `json:"port"` Auth string `json:"auth"` @@ -29,7 +28,7 @@ func (cfg SmtpEmailerConfig) EmailerType() string { } func (cfg SmtpEmailerConfig) EmailerID() string { - return cfg.ID + return SmtpEmailerType } func (cfg SmtpEmailerConfig) Emailer() (Emailer, error) { diff --git a/static/fixtures/emailer.json.sample b/static/fixtures/emailer.json.sample index 8ffc8dfc..15a5cd26 100644 --- a/static/fixtures/emailer.json.sample +++ b/static/fixtures/emailer.json.sample @@ -1,4 +1,3 @@ { - "type": "fake", - "id": "fake" + "type": "fake" } \ No newline at end of file