email

package
v0.0.0-...-5d42abc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddrContext

func AddAddrContext(email, context string) (string, error)

AddAddrContext embeds context into local part of the provided email address using '+'. Returns the resulting email address.

func CanonicalEmail

func CanonicalEmail(email string) string

func FormReply

func FormReply(email, reply string) string

func MergeEmailLists

func MergeEmailLists(lists ...[]string) []string

MergeEmailLists merges several email lists removing duplicates and invalid entries.

func ParsePatch

func ParsePatch(text string) (title string, diff string, err error)

func RemoveAddrContext

func RemoveAddrContext(email string) (string, string, error)

RemoveAddrContext extracts context after '+' from the local part of the provided email address. Returns address without the context and the context.

Types

type Email

type Email struct {
	BugID       string
	MessageID   string
	Link        string
	Subject     string
	From        string
	Cc          []string
	Body        string // text/plain part
	Patch       string // attached patch, if any
	Command     string // command to bot (#syz is stripped)
	CommandArgs string // arguments for the command
}

func Parse

func Parse(r io.Reader, ownEmails []string) (*Email, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL