Skip to content

Commit

Permalink
Handle paths with and without trailing /
Browse files Browse the repository at this point in the history
  • Loading branch information
Villaquiranm committed Oct 5, 2024
1 parent 88c73f0 commit 44441cc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions misc/stdlib_diff/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ func NewReportBuilder(srcPath, dstPath, outDir string, srcIsGno bool) (*ReportBu
}

return &ReportBuilder{
SrcPath: srcPath,
DstPath: dstPath,
OutDir: outDir,
// Trim suffix / in order to standardize paths accept path with or without `/`
SrcPath: strings.TrimSuffix(srcPath, `/`),
DstPath: strings.TrimSuffix(dstPath, `/`),
OutDir: strings.TrimSuffix(outDir, `/`),
SrcIsGno: srcIsGno,
packageTemplate: packageTemplate,
indexTemplate: indexTemplate,
Expand Down

0 comments on commit 44441cc

Please sign in to comment.