Skip to content
Permalink
Browse files

Updating README, CI and disable some linters for specific checks

  • Loading branch information...
Depado committed Jun 11, 2018
1 parent ce64e50 commit f2a56314b15b33b980d6752f64284dc048d03530
Showing with 31 additions and 10 deletions.
  1. +22 −0 .drone.yml
  2. +3 −4 README.md
  3. +4 −4 hermes.go
  4. +2 −2 hermes_test.go
@@ -0,0 +1,22 @@
workspace:
base: /go
path: src/github.com/Depado/hermes/

pipeline:
prerequisites:
image: "golang:latest"
commands:
- go version
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -vendor-only

linter:
image: "golang:latest"
commands:
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
- golangci-lint run -D errcheck

test:
image: "golang:latest"
commands:
- go test ./...
@@ -1,9 +1,8 @@
# Hermes

[![Build Status](https://travis-ci.org/matcornic/hermes.svg?branch=master)](https://travis-ci.org/matcornic/hermes)
[![Go Report Card](https://goreportcard.com/badge/github.com/matcornic/hermes)](https://goreportcard.com/report/github.com/matcornic/hermes)
[![Go Coverage](https://codecov.io/github/matcornic/hermes/coverage.svg)](https://codecov.io/github/matcornic/hermes/)
[![Godoc](https://godoc.org/github.com/matcornic/hermes?status.svg)](https://godoc.org/github.com/matcornic/hermes)
![Go Version](https://img.shields.io/badge/go-1.9-brightgreen.svg)
![Go Version](https://img.shields.io/badge/go-1.10-brightgreen.svg)
[![Build Status](https://drone.depado.eu/api/badges/Depado/hermes/status.svg)](https://drone.depado.eu/Depado/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-mails, reset password e-mails, receipt e-mails and so on), and associated plain text fallback.
@@ -29,7 +29,7 @@ type TextDirection string

var templateFuncs = template.FuncMap{
"url": func(s string) template.URL {
return template.URL(s)
return template.URL(s) // nolint: gas
},
}

@@ -74,7 +74,7 @@ type Body struct {

// ToHTML converts Markdown to HTML
func (c Markdown) ToHTML() template.HTML {
return template.HTML(blackfriday.Run([]byte(string(c))))
return template.HTML(blackfriday.Run([]byte(string(c)))) // nolint: gas
}

// Entry is a simple entry of a map
@@ -195,6 +195,6 @@ func (h *Hermes) generateTemplate(email Email, tplt string) (string, error) {
return "", err
}
var b bytes.Buffer
t.Execute(&b, Template{*h, email})
return b.String(), nil
err = t.Execute(&b, Template{*h, email})
return b.String(), err
}
@@ -444,9 +444,9 @@ func TestHermes_TextDirectionAsDefault(t *testing.T) {

func TestHermes_Default(t *testing.T) {
h := Hermes{}
setDefaultHermesValues(&h)
setDefaultHermesValues(&h) // nolint: errcheck
email := Email{}
setDefaultEmailValues(&email)
setDefaultEmailValues(&email) // nolint: errcheck

assert.Equal(t, h.TextDirection, TDLeftToRight)
assert.Equal(t, h.Theme, new(Default))

0 comments on commit f2a5631

Please sign in to comment.
You can’t perform that action at this time.