Added syntax highlighting to README.md

Closes #1
This commit is contained in:
Yoshua Wuyts 2014-10-20 12:55:04 +02:00 committed by alexcesaro
parent 707e81ecee
commit ed0214dc63
1 changed files with 24 additions and 22 deletions

View File

@ -32,13 +32,14 @@ https://godoc.org/gopkg.in/gomail.v1
## Example ## Example
package main ```go
package main
import ( import (
"gopkg.in/gomail.v1" "gopkg.in/gomail.v1"
) )
func main() { func main() {
msg := gomail.NewMessage() msg := gomail.NewMessage()
msg.SetHeader("From", "alex@example.com") msg.SetHeader("From", "alex@example.com")
msg.SetHeader("To", "bob@example.com", "cora@example.com") msg.SetHeader("To", "bob@example.com", "cora@example.com")
@ -57,7 +58,8 @@ https://godoc.org/gopkg.in/gomail.v1
if err := mailer.Send(msg); err != nil { if err := mailer.Send(msg); err != nil {
panic(err) panic(err)
} }
} }
```
## Contact ## Contact