Documentation
¶
Overview ¶
mailstrip is a Go library that parses email text and strips it of signatures and reply quotes. It is a port of email_reply_parser, GitHub's library for parsing email replies.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email []*Fragment
Email contains the parsed contents of an email.
func Parse ¶
Parse parses a plaintext email and returns the results.
Example ¶
text :=
`Yeah, that works!
-Bob
On 01/03/11 7:07 PM, Alice wrote:
> Hi Bob,
>
> can I push the latest release later tonight?
`
email := Parse(text)
fmt.Printf("result: %q\n", email.String())
Output: result: "Yeah, that works!"
type Fragment ¶
type Fragment struct {
// contains filtered or unexported fields
}
Fragment contains a parsed section of an email.
Click to show internal directories.
Click to hide internal directories.