Documentation
¶
Index ¶
- Variables
- func IsCIDRContain(cidr string, ip net.IP) bool
- func IsCodeRegionEqual(countryCode string, territoryCode string) bool
- func IsDigits(num string) bool
- func IsEMail(email string) bool
- func IsIPNetContain(ipNet *net.IPNet, ip net.IP) bool
- func IsPublicIP(ip net.IP) bool
- func IsValidPhoneCountryCode(code string) bool
- func IsValidPhoneNumber(number string) bool
- func IsValidPhoneTerritoryCode(code string) bool
- func ParseIPNet(cidr string) *net.IPNet
Constants ¶
This section is empty.
Variables ¶
View Source
var ExistCountryCodeMap = map[string]struct{}{} /* 233 elements not displayed */
View Source
var NonPublicIPNet = []net.IPNet{ *ParseIPNet("10.0.0.0/8"), *ParseIPNet("172.16.0.0/12"), *ParseIPNet("192.168.0.0/16"), *ParseIPNet("127.0.0.0/8"), *ParseIPNet("0.0.0.0/8"), *ParseIPNet("169.254.0.0/16"), *ParseIPNet("192.0.0.0/24"), *ParseIPNet("192.0.2.0/24"), *ParseIPNet("198.51.100.0/24"), *ParseIPNet("203.0.113.0/24"), *ParseIPNet("192.88.99.0/24"), *ParseIPNet("192.18.0.0/15"), *ParseIPNet("224.0.0.0/4"), *ParseIPNet("240.0.0.0/4"), *ParseIPNet("255.255.255.255/32"), *ParseIPNet("100.64.0.0/10"), *ParseIPNet("::/128"), *ParseIPNet("::1/128"), *ParseIPNet("100::/64"), *ParseIPNet("2001::/23"), *ParseIPNet("2001:2::/48"), *ParseIPNet("2001:db8::/32"), *ParseIPNet("2001::/32"), *ParseIPNet("fc00::/7"), *ParseIPNet("fe80::/10"), *ParseIPNet("ff00::/8"), *ParseIPNet("2002::/16"), }
Functions ¶
func IsCodeRegionEqual ¶
func IsPublicIP ¶
func IsValidPhoneCountryCode ¶
func IsValidPhoneNumber ¶
func ParseIPNet ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.