Browse Source

Merge pull request #71 from philips/pretty-print-conf

chore(etcd): pretty print the conf json
Xiang Li 12 years ago
parent
commit
b36feec757
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcd.go

+ 1 - 1
etcd.go

@@ -557,7 +557,7 @@ func getInfo(path string) *Info {
 	info = &argInfo
 	info = &argInfo
 
 
 	// Write to file.
 	// Write to file.
-	content, _ := json.Marshal(info)
+	content, _ := json.MarshalIndent(info, "", " ")
 	content = []byte(string(content) + "\n")
 	content = []byte(string(content) + "\n")
 	if err := ioutil.WriteFile(infoPath, content, 0644); err != nil {
 	if err := ioutil.WriteFile(infoPath, content, 0644); err != nil {
 		fatalf("Unable to write info to file: %v", err)
 		fatalf("Unable to write info to file: %v", err)