File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,18 @@ var pkgCache = map[string]cacheEntry{}
4343
4444// given a module+file spec (e.g. github.com/jandelgado/gcov2lcov/main.go),
4545// strip of the module name and return the file name (e.g. main.go).
46- func findFile (file string ) (string , error ) {
47- dir , file := filepath .Split (file )
46+ func findFile (filePath string ) (string , error ) {
47+ dir , file := filepath .Split (filePath )
4848 var result cacheEntry
4949 var ok bool
50- if result , ok = pkgCache [file ]; ! ok {
50+ if result , ok = pkgCache [filePath ]; ! ok {
5151 pkg , err := build .Import (dir , "." , build .FindOnly )
5252 if err == nil {
5353 result = cacheEntry {filepath .Join (pkg .Dir , file ), nil }
5454 } else {
5555 result = cacheEntry {"" , err }
5656 }
57- pkgCache [file ] = result
57+ pkgCache [filePath ] = result
5858 }
5959 return result .file , result .err
6060}
You can’t perform that action at this time.
0 commit comments