diff --git a/matchers/email_fallback.go b/matchers/email_fallback.go index bbad75c..e5a5227 100644 --- a/matchers/email_fallback.go +++ b/matchers/email_fallback.go @@ -25,7 +25,7 @@ func getRawEmailContacts(rawWhois string) []ProviderContact { sortedEmails := make([]ProviderContact, 0, len(emails)) for email := range emails { - sortedEmails = append(sortedEmails, AbuseEmail{providerID(email), email}) + sortedEmails = append(sortedEmails, AbuseEmail{ProviderName(email), email}) } sort.Slice(sortedEmails, func(i, j int) bool { return sortedEmails[i].(AbuseEmail).Email < sortedEmails[j].(AbuseEmail).Email diff --git a/matchers/shared_hosting.go b/matchers/shared_hosting.go index ab8e81e..afc8880 100644 --- a/matchers/shared_hosting.go +++ b/matchers/shared_hosting.go @@ -20,7 +20,7 @@ func IsSharedHostingProvider(u *url.URL) (bool, ProviderContact) { // Matches content served by shared hosting providers i.e. where the abusive content // is not served by the domain/server owner. // -// Try to keep this sorted alphabetically by providerID +// Try to keep this sorted alphabetically by ProviderName var sharedHostMatchers = []matcher{ {OnlineForm{"000webhost", "https://www.000webhost.com/report-abuse"}, isSubDomainOf("000webhost.com")}, {OnlineForm{"00webhost", "https://www.000webhost.com/report-abuse"}, isSubDomainOf("000webhostapp.com")}, diff --git a/matchers/types.go b/matchers/types.go index d28b1f6..17ce961 100644 --- a/matchers/types.go +++ b/matchers/types.go @@ -5,18 +5,18 @@ type ProviderContact interface { } type OnlineForm struct { - providerID + ProviderName URL string } type AbuseEmail struct { - providerID + ProviderName Email string } -type providerID string +type ProviderName string -func (m providerID) Name() string { +func (m ProviderName) Name() string { return string(m) } diff --git a/matchers/whois_matchers.go b/matchers/whois_matchers.go index 5b3ad92..b46720b 100644 --- a/matchers/whois_matchers.go +++ b/matchers/whois_matchers.go @@ -8,7 +8,7 @@ import ( // Matches WHOIS data to the best way to report abuse to the registrar/hosting provider. // -// Try to keep this sorted alphabetically by providerID +// Try to keep this sorted alphabetically by ProviderName var whoisMatchers = []matcher{ {OnlineForm{"Cloudflare", "https://www.cloudflare.com/abuse/form"}, whoisContains("abuse@cloudflare.com")}, {OnlineForm{"Dynadot", "https://www.dynadot.com/report_abuse.html"}, whoisContains("abuse@dynadot.com")},