Documentation
¶
Overview ¶
Package match provides a structure for Aho-Corasick output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Match ¶
type Match struct { // Pattern is a string value of a matched pattern. Pattern string // PatternIndex is a position of a pattern in the patterns slice // used for initialization of the trie. PatternIndex int // Pos is an optional field that provides start and end positions of the // pattern on the sarched string. *Pos }
Match contains data of one pattern matched to a string.
type Pos ¶
type Pos struct { // Start is the byte offset of the start of a pattern on the searched string. Start int // End is the byte offset of the end of a pattern on the searched string. // If End is used for providing a slice, it has to be incremented by one: // `haystack[pos.Start:pos.End+1]` End int }
Pos contains positional data of a pattern on the search string.
Click to show internal directories.
Click to hide internal directories.