func ipV4ToInt(ip net.IP) (uint32, error) {
	if ip == nil {
		return 0, fmt.Errorf("invalid IP")
	}
	if len(ip) == 16 {
		return binary.BigEndian.Uint32(ip[12:16]), nil
	}
	return binary.BigEndian.Uint32(ip), nil
}
// string ip to unsigned 32 bit number
string ip to unsigned 32 bit number
// string ip to unsigned 32 bit number
func ipV4ToInt(ip net.IP) (uint32, error) {
	if ip == nil {
		return 0, fmt.Errorf("invalid IP")
	}
	if len(ip) == 16 {
		return binary.BigEndian.Uint32(ip[12:16]), nil
	}
	return binary.BigEndian.Uint32(ip), nil
}
func ipV4ToInt ( ip net . IP ) ( uint32 , error ) { if ip == nil { return 0 , fmt . Errorf ( " " ) } if len ( ip ) == 16 { return binary . BigEndian . Uint32 ( ip [ 12 : 16 ] ) , nil } return binary . BigEndian . Uint32 ( ip ) , nil }
string ip to unsigned 32 bit number
string ip to unsigned 32 bit number