mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Refactoring: use CollectionFactory instead of manual collection creation.
This commit is contained in:
+1
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user