Skip to content

Commit

Permalink
fix (nats-top.go): fix a bug which was causing the SUBSCRIPTIONS colu…
Browse files Browse the repository at this point in the history
…mn to not be delimiter-separator when the --display-subscriptions-column flag would be used in conjunction with -o
  • Loading branch information
dsidirop committed May 13, 2022
1 parent 7ada215 commit 48cdd3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nats-top.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,10 @@ func generateParagraphPlainText(
var connRows string
if displaySubs {
header = append(header, "SUBSCRIPTIONS")
connRows = fmt.Sprintf(connHeader, header...)
} else {
connRows = fmt.Sprintf(connHeader, header...)
}

connRows = fmt.Sprintf(connHeader, header...)

text += connRows // Add to screen!

connValues := DEFAULT_PADDING
Expand Down Expand Up @@ -450,8 +449,9 @@ func generateParagraphCSV(

header = append(header, standardHeaders...)
connHeader += strings.Join(defaultHeaderAndRowColumnsForCsv, "[__DELIM__]")

if displaySubs {
connHeader += "%s"
connHeader += "[__DELIM__]%s" // SUBSCRIPTIONS
}

connHeader += "\n" // ...LAST ACTIVITY
Expand Down

0 comments on commit 48cdd3c

Please sign in to comment.