consul: fix json marshaling

This commit is contained in:
Ryan Uber 2014-09-05 22:01:49 -07:00
parent 8a4ed84711
commit 4b26566537
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ func Create(config *Config, logOutput io.Writer) (*Agent, error) {
// Setup encryption keyring files
if !config.DisableKeyring && config.EncryptKey != "" {
keyringBytes, err := json.MarshalIndent([]string{config.EncryptKey})
keys := []string{config.EncryptKey}
keyringBytes, err := json.MarshalIndent(keys, "", " ")
if err != nil {
return nil, err
}