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

Commit

Permalink
Renaming func and altering output to user
Browse files Browse the repository at this point in the history
  • Loading branch information
xmattstrongx committed Jan 31, 2017
1 parent f383865 commit 5456c4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/dep/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.Sour
notondisk := make(map[gps.ProjectRoot]bool)
ondisk := make(map[gps.ProjectRoot]gps.Version)

printNewDep := func(pr gps.ProjectRoot, sm *gps.SourceMgr) {
message := "Fetched latest of"
syncDep := func(pr gps.ProjectRoot, sm *gps.SourceMgr) {
message := "Cached"
if err := sm.SyncSourceFor(gps.ProjectIdentifier{ProjectRoot: pr}); err != nil {
message = "Unable to fetch latest of"
message = "Unable to cache"
}
fmt.Fprintf(os.Stderr, "%s %s\n", message, pr)
}
Expand Down Expand Up @@ -276,7 +276,7 @@ func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.Sour

continue
}
go printNewDep(pr, sm)
go syncDep(pr, sm)

vlogf("Package %q has import %q, analyzing...", v.P.ImportPath, ip)

Expand Down Expand Up @@ -375,7 +375,7 @@ func getProjectData(ctx *dep.Ctx, pkgT gps.PackageTree, cpr string, sm *gps.Sour
}
} else {
dependencies[pr] = []string{pkg}
go printNewDep(pr, sm)
go syncDep(pr, sm)
}

// project must be on disk at this point; question is
Expand Down

0 comments on commit 5456c4e

Please sign in to comment.