vendor dependencies with dep
This commit is contained in:
parent
93d8310491
commit
1384296a47
2712 changed files with 965742 additions and 0 deletions
19
vendor/github.com/vanng822/go-premailer/premailer/premailer_from_string.go
generated
vendored
Normal file
19
vendor/github.com/vanng822/go-premailer/premailer/premailer_from_string.go
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package premailer
|
||||
|
||||
import (
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// NewPremailerFromString take in a document in string format
|
||||
// and create a goquery.Document
|
||||
// and then create and Premailer instance.
|
||||
// It will panic if any error happens
|
||||
func NewPremailerFromString(doc string, options *Options) Premailer {
|
||||
read := strings.NewReader(doc)
|
||||
d, err := goquery.NewDocumentFromReader(read)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return NewPremailer(d, options)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue