Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFromReader ¶
LoadFromReader loads IP list from a reader. It might modify the List and causes List unsorted.
func LoadFromText ¶
LoadFromText loads an IP from s. It might modify the List and causes List unsorted.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a list of netip.Prefix. It stores all netip.Prefix in one single slice and use binary search. It is suitable for large static cidr search.
func (*List) Append ¶
Append appends new netip.Prefix(s) to the list. This modified the list. Caller must call List.Sort() before calling List.Contains()
Click to show internal directories.
Click to hide internal directories.