code: func (s *sshAgent) sortSigners(signers []ssh.Signer) {
  	if s.id == "" || len(signers) < 2 {
  		return
  	}
  
  	// if we can locate the public key, either by extracting it from the id or
  	// locating the .pub file, then we can more easily determine an exact match
  	idPk := findIDPublicKey(s.id)
  
  	// if we have a signer with a connect field that matches the id, send that
  	// first, otherwise put close matches at the front of the list.
  	head := 0
  	for i := range signers {
  		pk := signers[i].PublicKey()
  		k, ok := pk.(*agent.Key)
  		if !ok {
  			continue
  		}
  
  		// check for an exact match first
  		if bytes.Equal(pk.Marshal(), idPk) || s.id == k.Comment {
  			signers[0], signers[i] = signers[i], signers[0]
  			break
  		}
  
  		// no exact match yet, move it to the front if it's close. The agent
  		// may have loaded as a full filepath, while the config refers to it by
  		// filename only.
  		if strings.HasSuffix(k.Comment, s.id) {
  			signers[head], signers[i] = signers[i], signers[head]
  			head++
  			continue
  		}
  	}
  
  	ss := []string{}
  	for _, signer := range signers {
  		pk := signer.PublicKey()
  		k := pk.(*agent.Key)
  		ss = append(ss, k.Comment)
  	}
  }
docs: // sortSigners moves a signer with an agent comment field matching the
  // agent_identity to the head of the list when attempting authentication. This
  // helps when there are more keys loaded in an agent than the host will allow
  // attempts.