Documentation ¶
Index ¶
Constants ¶
View Source
const ( Added = +1 Existed = 0 Full = math.MaxInt / 2 // half so increment won't overflow )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ranges ¶
type Ranges struct {
// contains filtered or unexported fields
}
Ranges is an ordered set of non-overlapping ranges of strings. Ranges are inclusive e.g. Insert(from, to) means: from <= x <= to. The zero value is ready to use. It uses a specialized in-memory btree with a max size and number of levels. Nodes are fixed size to reduce allocation and bounds checks. ordset uses a variation of this code.
Click to show internal directories.
Click to hide internal directories.