Major refactoring: access to context happens in methods. #13

This commit is contained in:
Andrey Smirnov
2014-04-05 16:10:51 +04:00
parent 400d0da7d4
commit 2c3553ef0b
31 changed files with 333 additions and 265 deletions
+3 -3
View File
@@ -14,11 +14,11 @@ func aptlyMirrorList(cmd *commander.Command, args []string) error {
return err
}
if context.collectionFactory.RemoteRepoCollection().Len() > 0 {
if context.CollectionFactory().RemoteRepoCollection().Len() > 0 {
fmt.Printf("List of mirrors:\n")
repos := make([]string, context.collectionFactory.RemoteRepoCollection().Len())
repos := make([]string, context.CollectionFactory().RemoteRepoCollection().Len())
i := 0
context.collectionFactory.RemoteRepoCollection().ForEach(func(repo *debian.RemoteRepo) error {
context.CollectionFactory().RemoteRepoCollection().ForEach(func(repo *debian.RemoteRepo) error {
repos[i] = repo.String()
i++
return nil