Skip to content

Commit

Permalink
TrimRight is not designed to trim Suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
MushuEE authored and onsi committed May 23, 2022
1 parent ef336aa commit 71ebb74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integration/profiling_test.go
Expand Up @@ -54,7 +54,7 @@ func ParseProfile(binary string, path string) ProfileLines {
var cumStat float64
if strings.Contains(cumStatEntry, "MB") {
var err error
cumStat, err = strconv.ParseFloat(strings.TrimRight(cumStatEntry, "MB"), 64)
cumStat, err = strconv.ParseFloat(strings.TrimSuffix(cumStatEntry, "MB"), 64)
ExpectWithOffset(1, err).ShouldNot(HaveOccurred())
} else {
duration, err := time.ParseDuration(cumStatEntry)
Expand Down

0 comments on commit 71ebb74

Please sign in to comment.