code: func (a *MinMaxAllocator) AllocateNext() (int, bool, error) {
  	a.lock.Lock()
  	defer a.lock.Unlock()
  
  	// Fast check if we're out of items
  	if a.free <= 0 {
  		return 0, false, ErrRangeFull
  	}
  
  	// Scan from the minimum until we find a free item
  	for i := a.min; i <= a.max; i++ {
  		if !a.has(i) {
  			a.used[i] = true
  			a.free--
  			return i, true, nil
  		}
  	}
  
  	// no free item found, but a.free != 0
  	return 0, false, ErrInternal
  }
docs: //AllocateNext allocates next value from the allocator.