Skip to content

Commit

Permalink
Fix rendering of some fields in stream report
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Oct 18, 2023
1 parent 02ac818 commit 8186db6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/stream_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1357,14 +1357,14 @@ func (c *streamCmd) renderStreams(stats []streamStat) {

if c.reportRaw {
if s.LostMsgs > 0 {
lost = fmt.Sprintf("%d (%d)", s.LostMsgs, s.LostBytes)
lost = fmt.Sprintf("%d (%d)", f(s.LostMsgs), s.LostBytes)

Check failure on line 1360 in cli/stream_command.go

View workflow job for this annotation

GitHub Actions / test (1.20)

fmt.Sprintf format %d has arg f(s.LostMsgs) of wrong type string

Check failure on line 1360 in cli/stream_command.go

View workflow job for this annotation

GitHub Actions / test (1.21)

fmt.Sprintf format %d has arg f(s.LostMsgs) of wrong type string
}
table.AddRow(s.Name, s.Storage, placement, s.Consumers, s.Msgs, s.Bytes, lost, s.Deleted, renderCluster(s.Cluster))
} else {
if s.LostMsgs > 0 {
lost = fmt.Sprintf("%s (%s)", f(s.LostMsgs), humanize.IBytes(s.LostBytes))
}
table.AddRow(s.Name, s.Storage, placement, s.Consumers, f(s.Msgs), humanize.IBytes(s.Bytes), lost, s.Deleted, renderCluster(s.Cluster))
table.AddRow(s.Name, s.Storage, placement, f(s.Consumers), f(s.Msgs), humanize.IBytes(s.Bytes), lost, f(s.Deleted), renderCluster(s.Cluster))
}
}

Expand Down

0 comments on commit 8186db6

Please sign in to comment.