Skip to content

Commit

Permalink
Adding another string to trim
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Feb 17, 2024
1 parent 3da210a commit 63838dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion forwarder/forwarder_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ func (v *Views) status(transporter commonTransporter.Transporter) (commonTranspo
response = fmt.Sprintf("failed to get message response from forwarder for stream %d", i)
} else {
response = strings.ReplaceAll(tempRespArr[0], "\n", "<br>")
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed=N/A ")
response = strings.TrimSpace(response)
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed=N/A")

Check failure on line 49 in forwarder/forwarder_status.go

View workflow job for this annotation

GitHub Actions / lint-forwarder

SA1024: cutset contains duplicate characters (staticcheck)
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x")

Check failure on line 50 in forwarder/forwarder_status.go

View workflow job for this annotation

GitHub Actions / lint-forwarder

SA1024: cutset contains duplicate characters (staticcheck)
response += tempRespArr[len(tempRespArr)-1]
}
if i == 0 {
Expand Down
4 changes: 3 additions & 1 deletion recorder/recorder_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func (v *Views) status(transporter commonTransporter.Transporter) (string, error
response = "failed to get message response from recorder"
} else {
response = strings.ReplaceAll(tempRespArr[0], "\n", "<br>")
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed=N/A ")
response = strings.TrimSpace(response)
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed=N/A")

Check failure on line 39 in recorder/recorder_status.go

View workflow job for this annotation

GitHub Actions / lint-recorder

SA1024: cutset contains duplicate characters (staticcheck)
response = strings.TrimRight(response, "size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x")

Check failure on line 40 in recorder/recorder_status.go

View workflow job for this annotation

GitHub Actions / lint-recorder

SA1024: cutset contains duplicate characters (staticcheck)
response += tempRespArr[len(tempRespArr)-1]
}
return response, nil
Expand Down

0 comments on commit 63838dd

Please sign in to comment.