code: func disconnectPeer(peerList map[int32]*serverPeer, compareFunc func(*serverPeer) bool, whenFound func(*serverPeer)) bool {
  	for addr, peer := range peerList {
  		if compareFunc(peer) {
  			if whenFound != nil {
  				whenFound(peer)
  			}
  
  			// This is ok because we are not continuing
  			// to iterate so won't corrupt the loop.
  			delete(peerList, addr)
  			peer.Disconnect()
  			return true
  		}
  	}
  	return false
  }
docs: // disconnectPeer attempts to drop the connection of a targeted peer in the
  // passed peer list. Targets are identified via usage of the passed
  // `compareFunc`, which should return `true` if the passed peer is the target
  // peer. This function returns true on success and false if the peer is unable
  // to be located. If the peer is found, and the passed callback: `whenFound'
  // isn't nil, we call it with the peer as the argument before it is removed
  // from the peerList, and is disconnected from the server.