From 2e7c8c2f521c9e50bb3aea4df16771c22fe70e58 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 10 Sep 2016 20:14:20 +0100 Subject: Allow filtering results --- client/keys.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') 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) } -- cgit v1.2.3