mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-25 04:17:44 +08:00
core/commands: Fixed net diag command not outputting in chosen format
This commit is contained in:
parent
ae5e244354
commit
2c019b542e
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user