code: func (m *idManager) add(b *queue.TxBuffer) uint64 {
  	if i := m.freeList; i != nilID {
  		// There is an id available in the free list, just use it.
  		m.ids[i].buf = b
  		m.freeList = m.ids[i].nextFree
  		return i
  	}
  
  	// We need to expand the id descriptor.
  	m.ids = append(m.ids, idDescriptor{buf: b})
  	return uint64(len(m.ids) - 1)
  }
docs: // add assigns an ID to the given tx buffer.