mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-18 19:15:19 +00:00
cmd/syncthing-cli: Fix errors show command (#4849)
This commit is contained in:
parent
bed6fb8baf
commit
071910b255
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user