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
+1 -3
View File
@@ -16,9 +16,7 @@ func aptlyRepoCreate(cmd *commander.Command, args []string) error {
repo := debian.NewLocalRepo(args[0], cmd.Flag.Lookup("comment").Value.String())
localRepoCollection := debian.NewLocalRepoCollection(context.database)
err = localRepoCollection.Add(repo)
err = context.collectionFactory.LocalRepoCollection().Add(repo)
if err != nil {
return fmt.Errorf("unable to add local repo: %s", err)
}