cmd/syncthing-cli: Fix errors show command (#4849)

This commit is contained in:
pramodhkp 2018-04-19 01:38:10 +05:30 committed by Audrius Butkevicius
parent bed6fb8baf
commit 071910b255

View File

@ -44,9 +44,9 @@ func errorsShow(c *cli.Context) {
json.Unmarshal(responseToBArray(response), &data)
writer := newTableWriter()
for _, item := range data["errors"] {
time := item["time"].(string)[:19]
time := item["when"].(string)[:19]
time = strings.Replace(time, "T", " ", 1)
err := item["error"].(string)
err := item["message"].(string)
err = strings.TrimSpace(err)
fmt.Fprintln(writer, time+":\t"+err)
}