diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-09-10 20:14:20 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-09-11 20:41:32 +0100 |
commit | 2e7c8c2f521c9e50bb3aea4df16771c22fe70e58 (patch) | |
tree | 44daf7fea192d0e2368b2bb93545098c0adf610a /client | |
parent | adc3c7f16051d51a58d96e32082aaeb051e3da20 (diff) |
Allow filtering results
Diffstat (limited to 'client')
-rw-r--r-- | client/keys.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/keys.go b/client/keys.go index 4b3b69e..0ec0f1d 100644 --- a/client/keys.go +++ b/client/keys.go @@ -6,6 +6,7 @@ import ( "crypto/rand" "crypto/rsa" "fmt" + "strings" "golang.org/x/crypto/ed25519" "golang.org/x/crypto/ssh" @@ -78,7 +79,7 @@ func GenerateKey(keytype string, bits int) (Key, ssh.PublicKey, error) { for k := range keytypes { valid = append(valid, k) } - return nil, nil, fmt.Errorf("Unsupported key type %s. Valid choices are %s", keytype, valid) + return nil, nil, fmt.Errorf("Unsupported key type %s. Valid choices are %s", keytype, strings.Join(valid, "|")) } return f(bits) } |