readme
This commit is contained in:
15
README.md
15
README.md
@@ -1,13 +1,14 @@
|
|||||||
# go-dkim
|
# go-dkim
|
||||||
DKIM package for Golang
|
|
||||||
|
|
||||||
[](https://godoc.org/github.com/toorop/go-dkim)
|
Fork of `toorop`'s DKIM with non-pointer API and bugfixes.
|
||||||
|
|
||||||
|
[](https://godoc.org/github.com/andres-erbsen/go-dkim)
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
```
|
```
|
||||||
go get github.com/toorop/go-dkim
|
go get github.com/andres-erbsen/go-dkim
|
||||||
```
|
```
|
||||||
Warning: you need to use Go 1.4.2-master or 1.4.3 (when it will be available)
|
Warning: you need to use Go 1.4.2-master or 1.4.3 (when it will be available)
|
||||||
see https://github.com/golang/go/issues/10482 fro more info.
|
see https://github.com/golang/go/issues/10482 fro more info.
|
||||||
@@ -16,7 +17,7 @@ see https://github.com/golang/go/issues/10482 fro more info.
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
dkim "github.com/toorop/go-dkim"
|
dkim "github.com/andres-erbsen/go-dkim"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main(){
|
func main(){
|
||||||
@@ -33,8 +34,6 @@ func main(){
|
|||||||
options.Canonicalization = "relaxed/relaxed"
|
options.Canonicalization = "relaxed/relaxed"
|
||||||
err := dkim.Sign(&email, options)
|
err := dkim.Sign(&email, options)
|
||||||
// handle err..
|
// handle err..
|
||||||
|
|
||||||
// And... that's it, 'email' is signed ! Amazing© !!!
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -46,11 +45,11 @@ import (
|
|||||||
|
|
||||||
func main(){
|
func main(){
|
||||||
// email is the email to verify (byte slice)
|
// email is the email to verify (byte slice)
|
||||||
status, err := Verify(&email)
|
_, err := Verify(email, nil, nil)
|
||||||
// handle status, err (see godoc for status)
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
|
||||||
- [ ] handle z tag (copied header fields used for diagnostic use)
|
- [ ] handle z tag (copied header fields used for diagnostic use)
|
||||||
|
- [ ] handle multiple dns records
|
||||||
|
|||||||
Reference in New Issue
Block a user