зеркало из https://github.com/golang/dep.git
Whoops, need to export Analyzer now
This commit is contained in:
Родитель
8438fd4bbc
Коммит
00a5b76e36
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче