Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustMatchIndex ¶
func AdjustMatchIndex(segments []*EncodedSegment, matchIndex []int) []int
AdjustMatchIndex maps a match index from the current decode pass back to its location in the original text
func CurrentLine ¶
func CurrentLine(segments []*EncodedSegment, currentRaw string) string
CurrentLine returns from the start of the line containing the segments to the end of the line where the segment ends.
func Tags ¶
func Tags(segments []*EncodedSegment) []string
Tags returns additional meta data tags related to the types of segments
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes various types of data in place
func (*Decoder) Decode ¶
func (d *Decoder) Decode(data string, predecessors []*EncodedSegment) (string, []*EncodedSegment)
Decode returns the data with the values decoded in place along with the encoded segment meta data for the next pass of decoding
type EncodedSegment ¶
type EncodedSegment struct {
// contains filtered or unexported fields
}
EncodedSegment represents a portion of text that is encoded in some way.
func SegmentsWithDecodedOverlap ¶
func SegmentsWithDecodedOverlap(segments []*EncodedSegment, start, end int) []*EncodedSegment
SegmentsWithDecodedOverlap the segments where the start and end overlap its decoded range
Click to show internal directories.
Click to hide internal directories.