consolidate on api key and api secret to describe our key pairs (#138)
* consolidate on api key and api secret to describe our key pairs * tweak error message for the keys flag
This commit is contained in:
@@ -20,7 +20,7 @@ func generateKeys(c *cli.Context) error {
|
||||
apiKey := utils.NewGuid(utils.APIKeyPrefix)
|
||||
secret := utils.RandomSecret()
|
||||
fmt.Println("API Key: ", apiKey)
|
||||
fmt.Println("Secret Key: ", secret)
|
||||
fmt.Println("API Secret: ", secret)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ func main() {
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "generate-keys",
|
||||
Usage: "generates a pair of API & secret keys",
|
||||
Usage: "generates an API key and secret pair",
|
||||
Action: generateKeys,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -213,7 +213,7 @@ func (conf *Config) updateFromCLI(c *cli.Context) error {
|
||||
}
|
||||
if c.IsSet("keys") {
|
||||
if err := conf.unmarshalKeys(c.String("keys")); err != nil {
|
||||
return errors.New("Could not parse keys, it needs to be \"key: secret\", one per line")
|
||||
return errors.New("Could not parse keys, it needs to be exactly, \"key: secret\", including the space")
|
||||
}
|
||||
}
|
||||
if c.IsSet("redis-host") {
|
||||
|
||||
Reference in New Issue
Block a user