<commit_before>package ssh

import (
	"code.google.com/p/go.crypto/ssh"
	"io"
)

type Keychain struct {
	keys []ssh.Signer
}

func (k *Keychain) Add(privateKey []byte) error {
	key, err := ssh.ParsePrivateKey(privateKey)

	if err != nil {
		return err
	}

	k.keys = append(k.keys, key)

	return nil
}

func (k *Keychain) Key(i int) ssh.PublicKey {
	if i < 0 || i >= len(k.keys) {
		return nil
	}

	return k.keys[i].PublicKey()
}

func (k *Keychain) Sign(i int, rand io.Reader, data []byte) ([]byte, error) {
	return k.keys[i].Sign(rand, data)
}<commit_msg>Go didn't error for me. Build failed so making this match the ClientKeyring sig<commit_after>package ssh

import (
	"code.google.com/p/go.crypto/ssh"
	"io"
)

type Keychain struct {
	keys []ssh.Signer
}

func (k *Keychain) Add(privateKey []byte) error {
	key, err := ssh.ParsePrivateKey(privateKey)

	if err != nil {
		return err
	}

	k.keys = append(k.keys, key)

	return nil
}

func (k *Keychain) Key(i int) (ssh.PublicKey, error) {
	if i < 0 || i >= len(k.keys) {
		return nil, nil
	}

	return k.keys[i].PublicKey(), nil
}

func (k *Keychain) Sign(i int, rand io.Reader, data []byte) ([]byte, error) {
	return k.keys[i].Sign(rand, data)
}
{'fraction_non_alphanumeric': 0.16123642439431912, 'fraction_numerical': 0.001670843776106934, 'mean_word_length': 3.6796875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '879523', 'n_tokens_mistral': 500, 'n_tokens_neox': 473, 'n_words': 132}