code: func compareIPMask(ip net.IP, mask net.IPMask) (is int, ms int, err error) {
  	// Find the effective starting of address and mask
  	if len(ip) == net.IPv6len && ip.To4() != nil {
  		is = 12
  	}
  	if len(ip[is:]) == net.IPv4len && len(mask) == net.IPv6len && bytes.Equal(mask[:12], v4inV6MaskPrefix) {
  		ms = 12
  	}
  	// Check if address and mask are semantically compatible
  	if len(ip[is:]) != len(mask[ms:]) {
  		err = fmt.Errorf("ip and mask are not compatible: (%#v, %#v)", ip, mask)
  	}
  	return
  }
docs: // compareIPMask checks if the passed ip and mask are semantically compatible.
  // It returns the byte indexes for the address and mask so that caller can
  // do bitwise operations without modifying address representation.