code: func Host(base *net.IPNet, num int) (net.IP, error) {
  	ip := base.IP
  	mask := base.Mask
  
  	parentLen, addrLen := mask.Size()
  	hostLen := addrLen - parentLen
  
  	maxHostNum := uint64(1<<uint64(hostLen)) - 1
  
  	numUint64 := uint64(num)
  	if num < 0 {
  		numUint64 = uint64(-num) - 1
  		num = int(maxHostNum - numUint64)
  	}
  
  	if numUint64 > maxHostNum {
  		return nil, fmt.Errorf("prefix of %d does not accommodate a host numbered %d", parentLen, num)
  	}
  	var bitlength int
  	if ip.To4() != nil {
  		bitlength = 32
  	} else {
  		bitlength = 128
  	}
  	return insertNumIntoIP(ip, num, bitlength), nil
  }
docs: // Host takes a parent CIDR range and turns it into a host IP address with
  // the given host number.
  //
  // For example, 10.3.0.0/16 with a host number of 2 gives 10.3.0.2.