Skip to content

Commit

Permalink
Use ReplaceAll instead of Replace with -1 pos arg (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev authored Nov 6, 2022
1 parent da406e3 commit ed5598a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/readme/readme.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func getBenchmarkRow(
if len(split) < 5 {
return nil, fmt.Errorf("unknown benchmark line: %s", line)
}
duration, err := time.ParseDuration(strings.Replace(strings.TrimSuffix(strings.TrimSpace(split[2]), "/op"), " ", "", -1))
duration, err := time.ParseDuration(strings.ReplaceAll(strings.TrimSuffix(strings.TrimSpace(split[2]), "/op"), " ", ""))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit ed5598a

Please sign in to comment.