Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Use ProjectRootCache in godep importer
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynvs committed Jul 25, 2017
1 parent 3b7e4c2 commit ed1b50f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/dep/godep_importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ type godepImporter struct {
logger *log.Logger
verbose bool
sm gps.SourceManager
prCache gps.ProjectRootCache
}

func newGodepImporter(logger *log.Logger, verbose bool, sm gps.SourceManager) *godepImporter {
return &godepImporter{
logger: logger,
verbose: verbose,
sm: sm,
prCache: gps.NewProjectRootCache(sm),
}
}

Expand Down Expand Up @@ -101,7 +103,7 @@ func (g *godepImporter) convert(pr gps.ProjectRoot) (*dep.Manifest, *dep.Lock, e
}

// Obtain ProjectRoot. Required for avoiding sub-package imports.
ip, err := g.sm.DeduceProjectRoot(pkg.ImportPath)
ip, err := g.prCache.DeduceProjectRoot(pkg.ImportPath)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit ed1b50f

Please sign in to comment.