code: func (dp *DHCPPool) GetFreeIPIndex(mac string) (uint64, string, error) {
  	dp.lock.Lock()
  	defer dp.lock.Unlock()
  
  	if len(dp.free) == 0 {
  		return 0, FreeMac, errors.New("DHCP pool is full")
  	}
  	index := rand.Intn(len(dp.free))
  
  	var available uint64
  	for available = range dp.free {
  		if index == 0 {
  			break
  		}
  		index--
  	}
  
  	delete(dp.free, available)
  	dp.mac[available] = mac
  
  	return available, mac, nil
  }
docs: // Returns a random free IP address, an error if the pool is full