Refactoring: use CollectionFactory instead of manual collection creation.

This commit is contained in:
Andrey Smirnov
2014-03-25 14:59:26 +04:00
parent a0497058ee
commit 1a60ac6aa0
24 changed files with 101 additions and 165 deletions

View File

@@ -19,10 +19,8 @@ func ListPackagesRefList(reflist *debian.PackageRefList) (err error) {
return
}
packageCollection := debian.NewPackageCollection(context.database)
err = reflist.ForEach(func(key []byte) error {
p, err2 := packageCollection.ByKey(key)
p, err2 := context.collectionFactory.PackageCollection().ByKey(key)
if err2 != nil {
return err2
}