Documentation ¶ Index ¶ func ParseBytes(data []byte, parser Parser) (<-chan Item, error) func ParseFile(filename string, parser Parser) (<-chan Item, error) type Item type ListType type Parser type TextParser func (p *TextParser) Parse(reader io.Reader, itemChan chan<- Item) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ParseBytes ¶ func ParseBytes(data []byte, parser Parser) (<-chan Item, error) func ParseFile ¶ func ParseFile(filename string, parser Parser) (<-chan Item, error) Types ¶ type Item ¶ type Item struct { Type ListType Value string Metadata map[string]interface{} } type ListType ¶ type ListType string const ( Domain ListType = "Domain" URL ListType = "URL" IPv4 ListType = "IPv4" IPv6 ListType = "IPv6" Email ListType = "Email" ) type Parser ¶ type Parser interface { Parse(reader io.Reader, itemChan chan<- Item) error } type TextParser ¶ type TextParser struct { ParseFunc func(string) (Item, bool) } func (*TextParser) Parse ¶ func (p *TextParser) Parse(reader io.Reader, itemChan chan<- Item) error Source Files ¶ View all Source files parsers.gotext.parser.go Click to show internal directories. Click to hide internal directories.