code: func ToCIDR(ip net.IP) string {
  	len := 32
  	if ip.To4() == nil {
  		len = 128
  	}
  	return fmt.Sprintf("%s/%d", ip.String(), len)
  }
docs: // ToCIDR returns a host address of the form <ip-address>/32 for
  // IPv4 and <ip-address>/128 for IPv6