mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-26 13:47:40 +00:00
Major refactoring: access to context happens in methods. #13
This commit is contained in:
@@ -15,12 +15,12 @@ func aptlySnapshotShow(cmd *commander.Command, args []string) error {
|
||||
|
||||
name := args[0]
|
||||
|
||||
snapshot, err := context.collectionFactory.SnapshotCollection().ByName(name)
|
||||
snapshot, err := context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to show: %s", err)
|
||||
}
|
||||
|
||||
err = context.collectionFactory.SnapshotCollection().LoadComplete(snapshot)
|
||||
err = context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to show: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user