Documentation ¶
Index ¶
- func FilterList(ips []net.IP, filter func(ip net.IP) bool) []net.IP
- func IsIPv4only(ip net.IP) bool
- func IsIPv6only(ip net.IP) bool
- func IsLinkLocalUnicast(ip net.IP) bool
- func IsLoopback(ip net.IP) bool
- func IsPrivate(ip net.IP) bool
- func NewIsFnsAnd(fns ...func(ip net.IP) bool) func(ip net.IP) bool
- func NewIsIPFnsOr(fns ...func(ip net.IP) bool) func(ip net.IP) bool
- func NotFilter(fn func(ip net.IP) bool) func(ip net.IP) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterList ¶
FilterList 对 ip 地址进行过滤
func IsIPv6only ¶
IsIPv6only reports whether addr is an IPv6 address except IPv4-mapped IPv6 address.
func IsPrivate ¶
IsPrivate is private ip
ipv4: 10/8、172.16/12 、192.168/16 prefix ipv6: FC00::/7 prefix
func NewIsFnsAnd ¶
NewIsFnsAnd create new ip list filter func
func NewIsIPFnsOr ¶
NewIsIPFnsOr create new ip list filter func
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.