core/commands: Fixed net diag command not outputting in chosen format

This commit is contained in:
Matt Bell 2015-01-24 16:27:06 -08:00 committed by Juan Batiz-Benet
parent ae5e244354
commit 2c019b542e

View File

@ -106,6 +106,7 @@ connected peers and latencies between them.
switch vis {
case visD3:
res.SetOutput(bytes.NewReader(diag.GetGraphJson(info)))
return
case visDot:
var buf bytes.Buffer
w := diag.DotWriter{W: &buf}
@ -115,6 +116,7 @@ connected peers and latencies between them.
return
}
res.SetOutput(io.Reader(&buf))
return
}
output, err := stdDiagOutputMarshal(standardDiagOutput(info))