Skip to content

Commit 21b0358

Browse files
moitiasalexandear
authored andcommitted
feat: use TrimPrefix instead of strings.Replace
Co-authored-by: Oleksandr Redko <[email protected]>
1 parent 57bd7bf commit 21b0358

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/result/processors/fixer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (f Fixer) Process(issues []result.Issue) []result.Issue {
5959
fileWithoutPathPrefix := file
6060

6161
if f.cfg.Output.PathPrefix != "" {
62-
fileWithoutPathPrefix = strings.Replace(fileWithoutPathPrefix, f.cfg.Output.PathPrefix+string(filepath.Separator), "", 1)
62+
fileWithoutPathPrefix = strings.TrimPrefix(fileWithoutPathPrefix, f.cfg.Output.PathPrefix+string(filepath.Separator))
6363
}
6464
err = f.fixIssuesInFile(fileWithoutPathPrefix, issuesToFix)
6565
})

0 commit comments

Comments
 (0)