Documentation ¶
Index ¶
- Variables
- func CIDR2Range(cidr string) (uint32, uint32, error)
- func CollectMapValues[K comparable, T any](m map[K]T, c func(T) string) []string
- func CollectSliceValues[T any](m []T, c func(T) string) []string
- func FindIpInfo[T IpRangeRecord](lib []T, ip net.IP) (T, bool)
- func IP2Int(ip net.IP) uint32
- func Int2IP(ip uint32) net.IP
- func MapKeys[T any](m map[string]T) []string
- func Range2CIDR(start, end uint32) *net.IPNet
- func SliceToMapIndex(lib []string) map[string]int
- func SortUniqueSlice[T cmp.Ordered](lib []T) []T
- type IpRangeRecord
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CollectMapValues ¶
func CollectMapValues[K comparable, T any](m map[K]T, c func(T) string) []string
func CollectSliceValues ¶
func FindIpInfo ¶
func FindIpInfo[T IpRangeRecord](lib []T, ip net.IP) (T, bool)
func Range2CIDR ¶
func SliceToMapIndex ¶
func SortUniqueSlice ¶
Types ¶
type IpRangeRecord ¶
Click to show internal directories.
Click to hide internal directories.