Skip to content

Commit af2da8e

Browse files
committed
Minor edits, updates
1 parent 2475418 commit af2da8e

File tree

1 file changed

+65
-53
lines changed

1 file changed

+65
-53
lines changed

README.md

Lines changed: 65 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
[![Go](https://img.shields.io/github/go-mod/go-version/mrz1836/go-mail)](https://golang.org/)
55
[![Build Status](https://travis-ci.com/mrz1836/go-mail.svg?branch=master)](https://travis-ci.com/mrz1836/go-mail)
66
[![Report](https://goreportcard.com/badge/github.com/mrz1836/go-mail?style=flat&v=1)](https://goreportcard.com/report/github.com/mrz1836/go-mail)
7-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/52bfcc447ee24c29a2a3fb65c53a4de3)](https://www.codacy.com/app/mrz1818/go-mail?utm_source=github.com&utm_medium=referral&utm_content=mrz1836/go-mail&utm_campaign=Badge_Grade)
87
[![Release](https://img.shields.io/github/release-pre/mrz1836/go-mail.svg?style=flat&v=1)](https://github.com/mrz1836/go-mail/releases)
9-
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat)](https://github.com/RichardLitt/standard-readme)
10-
[![GoDoc](https://godoc.org/github.com/mrz1836/go-mail?status.svg&style=flat)](https://godoc.org/github.com/mrz1836/go-mail)
8+
[![GoDoc](https://godoc.org/github.com/mrz1836/go-mail?status.svg&style=flat)](https://pkg.go.dev/github.com/mrz1836/go-mail)
119

1210
## Table of Contents
1311
- [Installation](#installation)
@@ -27,15 +25,8 @@
2725
$ go get -u github.com/mrz1836/go-mail
2826
```
2927

30-
### Package Dependencies
31-
- domodwyer's [mailyak](https://github.com/domodwyer/mailyak)
32-
- keighl's [postmark](https://github.com/mrz1836/postmark)
33-
- mattbaird's [gochimp](https://github.com/mattbaird/gochimp)
34-
- sourcegraph's [go-ses](https://github.com/sourcegraph/go-ses)
35-
- aymerick's [douceur](https://github.com/aymerick/douceur)
36-
3728
## Documentation
38-
You can view the generated [documentation here](https://godoc.org/github.com/mrz1836/go-mail).
29+
You can view the generated [documentation here](https://pkg.go.dev/github.com/mrz1836/go-mail).
3930

4031
### Features
4132
- Supports multiple service providers _(below)_
@@ -47,38 +38,89 @@ You can view the generated [documentation here](https://godoc.org/github.com/mrz
4738
- Basic template support
4839
- Max restrictions on To, CC and BCC
4940

50-
### Supported Service Providers
41+
<details>
42+
<summary><strong><code>Supported Service Providers</code></strong></summary>
43+
5144
- [AWS SES](https://docs.aws.amazon.com/ses/)
5245
- [Mandrill](https://mandrillapp.com/api/docs/)
5346
- [Postmark](https://postmarkapp.com/developer)
5447
- [SMTP](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol)
48+
</details>
49+
50+
<details>
51+
<summary><strong><code>Package Dependencies</code></strong></summary>
52+
53+
- domodwyer's [mailyak](https://github.com/domodwyer/mailyak)
54+
- keighl's [postmark](https://github.com/mrz1836/postmark)
55+
- mattbaird's [gochimp](https://github.com/mattbaird/gochimp)
56+
- sourcegraph's [go-ses](https://github.com/sourcegraph/go-ses)
57+
- aymerick's [douceur](https://github.com/aymerick/douceur)
58+
</details>
59+
60+
<details>
61+
<summary><strong><code>Library Deployment</code></strong></summary>
62+
63+
[goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to Github and can be installed via: `brew install goreleaser`.
64+
65+
The [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser).
66+
67+
Use `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production.
68+
</details>
69+
70+
<details>
71+
<summary><strong><code>Makefile Commands</code></strong></summary>
72+
73+
View all `makefile` commands
74+
```bash
75+
$ make help
76+
```
77+
78+
List of all current commands:
79+
```text
80+
all Runs test, install, clean, docs
81+
bench Run all benchmarks in the Go application
82+
clean Remove previous builds and any test cache data
83+
clean-mods Remove all the Go mod cache
84+
coverage Shows the test coverage
85+
godocs Sync the latest tag with GoDocs
86+
help Show all make commands available
87+
lint Run the Go lint application
88+
release Full production release (creates release in Github)
89+
release-test Full production test release (everything except deploy)
90+
release-snap Test the full release (build binaries)
91+
tag Generate a new tag and push (IE: make tag version=0.0.0)
92+
tag-remove Remove a tag if found (IE: make tag-remove version=0.0.0)
93+
tag-update Update an existing tag to current commit (IE: make tag-update version=0.0.0)
94+
test Runs vet, lint and ALL tests
95+
test-short Runs vet, lint and tests (excludes integration tests)
96+
update Update all project dependencies
97+
update-releaser Update the goreleaser application
98+
vet Run the Go vet application
99+
```
100+
</details>
55101

56102
## Examples & Tests
57103
All unit tests and [examples](examples/examples.go) run via [Travis CI](https://travis-ci.com/mrz1836/go-mail) and uses [Go version 1.14.x](https://golang.org/doc/go1.14). View the [deployment configuration file](.travis.yml).
58104

59105
Run all tests (including integration tests)
60106
```bash
61-
$ cd ../go-mail
62-
$ go test ./... -v
107+
$ make test
63108
```
64109

65110
Run tests (excluding integration tests)
66111
```bash
67-
$ cd ../go-mail
68-
$ go test ./... -v -test.short
112+
$ make test-short
69113
```
70114

71115
View and run the examples:
72116
```bash
73-
$ cd ../go-mail/examples
74-
$ go run examples.go
117+
$ make run-examples
75118
```
76119

77120
## Benchmarks
78121
Run the Go benchmarks:
79122
```bash
80-
$ cd ../go-mail
81-
$ go test -bench . -benchmem
123+
$ make bench
82124
```
83125

84126
## Code Standards
@@ -87,41 +129,11 @@ Read more about this Go project's [code standards](CODE_STANDARDS.md).
87129
## Usage
88130
View the [examples](examples/examples.go)
89131

90-
Basic implementation:
91-
```golang
92-
package main
93-
94-
import (
95-
"github.com/mrz1836/go-mail"
96-
)
97-
98-
func main() {
99-
100-
// Config
101-
mail := new(gomail.MailService)
102-
mail.FromName = "No Reply"
103-
mail.FromUsername = "no-reply"
104-
mail.FromDomain = "example.com"
105-
106-
// Provider
107-
mail.MandrillAPIKey = "1234567"
108-
109-
// Start the service
110-
_ = mail.StartUp()
111-
112-
// Create and send a basic email
113-
email := mail.NewEmail()
114-
email.HTMLContent = "<html><body>This is a <b>go-mail</b> test email using <i>HTML</i></body></html>"
115-
email.Recipients = []string{"jack@example.com"}
116-
email.Subject = "testing go-mail package - test message"
117-
118-
_ = mail.SendEmail(email, gomail.Mandrill)
119-
}
120-
```
121-
122132
## Maintainers
123133

124-
[@MrZ](https://github.com/mrz1836)
134+
| [<img src="https://github.com/mrz1836.png" height="50" alt="MrZ" />](https://github.com/mrz1836) |
135+
|:---:|
136+
| [MrZ](https://github.com/mrz1836) |
125137

126138
## Contributing
127139

0 commit comments

Comments
 (0)