Pārlūkot izejas kodu

chore(etcd): pretty print the conf json

someone might edit this so pretty print it.
Brandon Philips 12 gadi atpakaļ
vecāks
revīzija
5000e1de4a
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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)