code: func (a *IPRangeAllocator) findNextAvailbleIndex(idx int64) int64 {
  	// walk up from the index
  	for i := idx; i < a.size; i++ {
  		if !a.reserved[i] {
  			return i
  		}
  	}
  
  	// nothing above that one... lets try to walk down to find something
  	for i := idx - 1; i >= 0; i-- {
  		if !a.reserved[i] {
  			return i
  		}
  	}
  
  	// ok, everything is probably taken
  	return -1
  }
docs: // findNextAvailableIndex finds the value of idx which is available and not in
  // the reserved list.