mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
chore(etcd): pretty print the conf json
someone might edit this so pretty print it.
This commit is contained in:
parent
9d488f5529
commit
5000e1de4a
2
etcd.go
2
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user