Files
postmoogle/vendor/github.com/jhillyerd/enmime/parser.go
2022-11-16 12:08:51 +02:00

23 lines
424 B
Go

package enmime
// Parser parses MIME.
// Default parser is a valid one.
type Parser struct {
skipMalformedParts bool
multipartWOBoundaryAsSinglePart bool
}
// defaultParser is a Parser with default configuration.
var defaultParser = Parser{}
// NewParser creates new parser with given options.
func NewParser(ops ...Option) *Parser {
p := Parser{}
for _, o := range ops {
o.apply(&p)
}
return &p
}