Refactor by separating AptlyContext into separate package. #116

This commit is contained in:
Andrey Smirnov
2014-10-06 21:54:15 +04:00
parent 159608cef3
commit 8a787d2c35
29 changed files with 463 additions and 413 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to load packages: %s", err)
}
forceReplace := context.flags.Lookup("force-replace").Value.Get().(bool)
forceReplace := context.Flags().Lookup("force-replace").Value.Get().(bool)
packageFiles := []string{}
failedFiles := []string{}
@@ -194,7 +194,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to save: %s", err)
}
if context.flags.Lookup("remove-files").Value.Get().(bool) {
if context.Flags().Lookup("remove-files").Value.Get().(bool) {
processedFiles = utils.StrSliceDeduplicate(processedFiles)
for _, file := range processedFiles {