code: func ParseIPv4(dst net.IP, ipStr []byte) (net.IP, error) {
  	if len(ipStr) == 0 {
  		return dst, errEmptyIPStr
  	}
  	if len(dst) < net.IPv4len {
  		dst = make([]byte, net.IPv4len)
  	}
  	copy(dst, net.IPv4zero)
  	dst = dst.To4()
  	if dst == nil {
  		panic("BUG: dst must not be nil")
  	}
  
  	b := ipStr
  	for i := 0; i < 3; i++ {
  		n := bytes.IndexByte(b, '.')
  		if n < 0 {
  			return dst, fmt.Errorf("cannot find dot in ipStr %q", ipStr)
  		}
  		v, err := ParseUint(b[:n])
  		if err != nil {
  			return dst, fmt.Errorf("cannot parse ipStr %q: %s", ipStr, err)
  		}
  		if v > 255 {
  			return dst, fmt.Errorf("cannot parse ipStr %q: ip part cannot exceed 255: parsed %d", ipStr, v)
  		}
  		dst[i] = byte(v)
  		b = b[n+1:]
  	}
  	v, err := ParseUint(b)
  	if err != nil {
  		return dst, fmt.Errorf("cannot parse ipStr %q: %s", ipStr, err)
  	}
  	if v > 255 {
  		return dst, fmt.Errorf("cannot parse ipStr %q: ip part cannot exceed 255: parsed %d", ipStr, v)
  	}
  	dst[3] = byte(v)
  
  	return dst, nil
  }
docs: // ParseIPv4 parses ip address from ipStr into dst and returns the extended dst.