From fc04e7ea13ac0654682d6c1425b9fc3d20ee5133 Mon Sep 17 00:00:00 2001 From: matcornic Date: Tue, 28 Mar 2017 18:41:38 +0200 Subject: [PATCH] fix golint errors --- README.md | 2 ++ examples/default/main.go | 4 ++-- examples/default/receipt.go | 6 +++--- examples/default/reset.go | 6 +++--- examples/default/welcome.go | 6 +++--- hermes.go | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bbf1cac..4a07dfd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Hermes +[![Go Report Card](https://goreportcard.com/badge/github.com/matcornic/hermes)](https://goreportcard.com/report/github.com/matcornic/hermes) + Hermes is the Go port of the great [mailgen](https://github.com/eladnava/mailgen) engine for Node.js. Check their work, it's awesome ! It's a package that generates clean, responsive HTML e-mails for sending transactional e-mails (welcome e-mail, reset password e-mails, receipt e-mails and so on). diff --git a/examples/default/main.go b/examples/default/main.go index 71bceb5..e444672 100644 --- a/examples/default/main.go +++ b/examples/default/main.go @@ -6,7 +6,7 @@ import ( "io/ioutil" ) -type Example interface { +type example interface { Email() hermes.Email Name() string } @@ -20,7 +20,7 @@ func main() { }, } - examples := []Example{ + examples := []example{ new(Welcome), new(Reset), new(Receipt), diff --git a/examples/default/receipt.go b/examples/default/receipt.go index edbaff7..c42529c 100644 --- a/examples/default/receipt.go +++ b/examples/default/receipt.go @@ -4,14 +4,14 @@ import ( "github.com/matcornic/hermes" ) -type Receipt struct { +type receipt struct { } -func (r *Receipt) Name() string { +func (r *receipt) Name() string { return "receipt" } -func (r *Receipt) Email() hermes.Email { +func (r *receipt) Email() hermes.Email { return hermes.Email{ Body: hermes.Body{ Name: "Jon Snow", diff --git a/examples/default/reset.go b/examples/default/reset.go index 7f06cc8..a7edcfd 100644 --- a/examples/default/reset.go +++ b/examples/default/reset.go @@ -4,14 +4,14 @@ import ( "github.com/matcornic/hermes" ) -type Reset struct { +type reset struct { } -func (r *Reset) Name() string { +func (r *reset) Name() string { return "reset" } -func (r *Reset) Email() hermes.Email { +func (r *reset) Email() hermes.Email { return hermes.Email{ Body: hermes.Body{ Name: "Jon Snow", diff --git a/examples/default/welcome.go b/examples/default/welcome.go index 41b2ec7..476a722 100644 --- a/examples/default/welcome.go +++ b/examples/default/welcome.go @@ -4,14 +4,14 @@ import ( "github.com/matcornic/hermes" ) -type Welcome struct { +type welcome struct { } -func (w *Welcome) Name() string { +func (w *welcome) Name() string { return "welcome" } -func (w *Welcome) Email() hermes.Email { +func (w *welcome) Email() hermes.Email { return hermes.Email{ Body: hermes.Body{ Name: "Jon Snow", diff --git a/hermes.go b/hermes.go index 1fc74d8..49cad10 100644 --- a/hermes.go +++ b/hermes.go @@ -48,7 +48,7 @@ type Email struct { type Body struct { Name string // The name of the contacted person Intros []string // Intro sentences, first displayed in the email - Dictionary []Entry // A list of key+value (usefull for displaying parameters/settings/personal info) + Dictionary []Entry // A list of key+value (useful for displaying parameters/settings/personal info) Table Table // Table is an table where you can put data (pricing grid, a bill, and so on) Actions []Action // Actions are a list of actions that the user will be able to execute via a button click Outros []string // Outro sentences, last displayed in the email