code: func keepOnlyActive(array []*Lease, now int64) []*Lease {
  	idx := 0
  	for i := 0; i < len(array); i++ {
  		item := array[i]
  		deadline := atomic.LoadInt64(&item.deadline)
  		if deadline == 0 || deadline > now {
  			array[idx] = array[i]
  			idx++
  		} else {
  			item.Cancel()
  		}
  	}
  	return array[:idx]
  }
docs: // keepOnlyActive removes completed items, call cancel function for timeout items.