aboutsummaryrefslogtreecommitdiffstats
path: root/core/object.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-29 23:06:10 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-29 23:06:10 +0200
commitb73657f1aa7016bdd4c2cbd50bee4c20d5ab69ef (patch)
tree7f93f11b91b84e605a26f573d40791a4f6cb49d0 /core/object.go
parente4246138cb9ffb819c052ba17a9fbdf915427291 (diff)
downloadgo-git-b73657f1aa7016bdd4c2cbd50bee4c20d5ab69ef.tar.gz
core: Storage.Get, switch order of args
Diffstat (limited to 'core/object.go')
-rw-r--r--core/object.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/object.go b/core/object.go
index 7e021cb..6a22122 100644
--- a/core/object.go
+++ b/core/object.go
@@ -137,10 +137,11 @@ func (iter *ObjectLookupIter) Next() (Object, error) {
return nil, io.EOF
}
hash := iter.series[iter.pos]
- obj, err := iter.storage.Get(hash, AnyObject)
+ obj, err := iter.storage.Get(AnyObject, hash)
if err == nil {
iter.pos++
}
+
return obj, err
}
@@ -151,7 +152,7 @@ func (iter *ObjectLookupIter) ForEach(cb func(Object) error) error {
defer iter.Close()
for _, hash := range iter.series {
- obj, err := iter.storage.Get(hash, AnyObject)
+ obj, err := iter.storage.Get(AnyObject, hash)
if err != nil {
return err
}