code: func (r *Router) removeManagerFromIndex(datacenter string, manager *Manager) {
  	managers := r.managers[datacenter]
  	for i := 0; i < len(managers); i++ {
  		if managers[i] == manager {
  			r.managers[datacenter] = append(managers[:i], managers[i+1:]...)
  			if len(r.managers[datacenter]) == 0 {
  				delete(r.managers, datacenter)
  			}
  			return
  		}
  	}
  	panic("managers index out of sync")
  }
docs: // removeManagerFromIndex does cleanup to take a manager out of the index of
  // datacenters. This assumes the lock is already held for writing, and will
  // panic if the given manager isn't found.