From 00a5b76e3610c146f449be0011ca0cabda5baafc Mon Sep 17 00:00:00 2001 From: sam boyer Date: Sat, 15 Apr 2017 01:23:16 -0400 Subject: [PATCH] Whoops, need to export Analyzer now --- analyzer.go | 6 +++--- analyzer_test.go | 4 ++-- cmd/dep/init.go | 2 +- project.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/analyzer.go b/analyzer.go index aed9aa93..ffd338c9 100644 --- a/analyzer.go +++ b/analyzer.go @@ -11,9 +11,9 @@ import ( "github.com/sdboyer/gps" ) -type analyzer struct{} +type Analyzer struct{} -func (a analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Manifest, gps.Lock, error) { +func (a Analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Manifest, gps.Lock, error) { // TODO: If we decide to support other tools manifest, this is where we would need // to add that support. mf := filepath.Join(path, ManifestName) @@ -36,6 +36,6 @@ func (a analyzer) DeriveManifestAndLock(path string, n gps.ProjectRoot) (gps.Man return m, nil, nil } -func (a analyzer) Info() (string, int) { +func (a Analyzer) Info() (string, int) { return "dep", 1 } diff --git a/analyzer_test.go b/analyzer_test.go index 0d3f4a6a..ff53a1c6 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -22,7 +22,7 @@ func TestDeriveManifestAndLock(t *testing.T) { want := h.GetTestFileString(golden) h.TempCopy(filepath.Join("dep", ManifestName), golden) - a := analyzer{} + a := Analyzer{} m, l, err := a.DeriveManifestAndLock(h.Path("dep"), "my/fake/project") if err != nil { @@ -56,7 +56,7 @@ func TestDeriveManifestAndLockDoesNotExist(t *testing.T) { } defer os.RemoveAll(dir) - a := analyzer{} + a := Analyzer{} m, l, err := a.DeriveManifestAndLock(dir, "my/fake/project") if m != nil || l != nil || err != nil { diff --git a/cmd/dep/init.go b/cmd/dep/init.go index a74f4804..7609aca2 100644 --- a/cmd/dep/init.go +++ b/cmd/dep/init.go @@ -141,7 +141,7 @@ func (cmd *initCommand) Run(ctx *dep.Ctx, args []string) error { RootPackageTree: pkgT, Manifest: m, Lock: l, - ProjectAnalyzer: analyzer{}, + ProjectAnalyzer: dep.Analyzer{}, } if *verbose { diff --git a/project.go b/project.go index 7031732a..eaea2ea5 100644 --- a/project.go +++ b/project.go @@ -60,7 +60,7 @@ type Project struct { func (p *Project) MakeParams() gps.SolveParameters { params := gps.SolveParameters{ RootDir: p.AbsRoot, - ProjectAnalyzer: analyzer{}, + ProjectAnalyzer: Analyzer{}, } if p.Manifest != nil {