You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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.
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>
55
101
56
102
## Examples & Tests
57
103
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).
58
104
59
105
Run all tests (including integration tests)
60
106
```bash
61
-
$ cd ../go-mail
62
-
$ go test ./... -v
107
+
$ make test
63
108
```
64
109
65
110
Run tests (excluding integration tests)
66
111
```bash
67
-
$ cd ../go-mail
68
-
$ go test ./... -v -test.short
112
+
$ make test-short
69
113
```
70
114
71
115
View and run the examples:
72
116
```bash
73
-
$ cd ../go-mail/examples
74
-
$ go run examples.go
117
+
$ make run-examples
75
118
```
76
119
77
120
## Benchmarks
78
121
Run the Go benchmarks:
79
122
```bash
80
-
$ cd ../go-mail
81
-
$ go test -bench . -benchmem
123
+
$ make bench
82
124
```
83
125
84
126
## Code Standards
@@ -87,41 +129,11 @@ Read more about this Go project's [code standards](CODE_STANDARDS.md).
87
129
## Usage
88
130
View the [examples](examples/examples.go)
89
131
90
-
Basic implementation:
91
-
```golang
92
-
package main
93
-
94
-
import (
95
-
"github.com/mrz1836/go-mail"
96
-
)
97
-
98
-
funcmain() {
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"
0 commit comments