Преглед изворни кода

chore(etcd): pretty print the conf json

someone might edit this so pretty print it.
Brandon Philips пре 12 година
родитељ
комит
5000e1de4a
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      etcd.go

+ 1 - 1
etcd.go

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