code: func ipRange(ip net.IP) (net.IP, net.IP) {
  	ip = ip.To16()
  	// For IPv6, match on a certain subnet range, since one person can commonly
  	// have an entire /48 to themselves.
  	maskLength := 48
  	// For IPv4 addresses, do a match on exact address, so begin = ip and end =
  	// next higher IP.
  	if ip.To4() != nil {
  		maskLength = 128
  	}
  
  	mask := net.CIDRMask(maskLength, 128)
  	begin := ip.Mask(mask)
  	end := incrementIP(begin, maskLength)
  
  	return begin, end
  }
docs: // ipRange returns a range of IP addresses suitable for querying MySQL for the
  // purpose of rate limiting using a range that is inclusive on the lower end and
  // exclusive at the higher end. If ip is an IPv4 address, it returns that address,
  // plus the one immediately higher than it. If ip is an IPv6 address, it applies
  // a /48 mask to it and returns the lowest IP in the resulting network, and the
  // first IP outside of the resulting network.