internal/report: make openSourceFile cognizant of Go modules
This change adds $GOPATH/pkg/mod as a possible base to search from given that Go modules have been the norm since Go1.11 and we are currently at Go1.16/1.17, hence support for Go modules.
Fixes #611
Kindly /cc-ing @ghemawat @aalexand
Codecov Report
Merging #612 (075f40d) into master (cbba55b) will increase coverage by
0.02%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #612 +/- ##
==========================================
+ Coverage 66.94% 66.97% +0.02%
==========================================
Files 78 78
Lines 14378 14388 +10
==========================================
+ Hits 9626 9636 +10
Misses 3892 3892
Partials 860 860
| Impacted Files | Coverage Δ | |
|---|---|---|
| internal/report/source.go | 78.43% <100.00%> (+0.23%) |
:arrow_up: |
| .../github.com/google/pprof/internal/report/source.go | 78.43% <0.00%> (+0.23%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update cbba55b...075f40d. Read the comment docs.
@odeke-em Is it possible to add a test that fails before the the change and passes after?