Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: service/datastore/datastore.go

Issue 1291813003: Make LazyMultiError constructed via function (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: interface not pointer Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service/datastore/checkfilter.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/datastore.go
diff --git a/service/datastore/datastore.go b/service/datastore/datastore.go
index ebcab095d33489c0a3c1bf2337eb24bc922486b0..456835ad36a14c460ea62f112a1a8e3a394fac95 100644
--- a/service/datastore/datastore.go
+++ b/service/datastore/datastore.go
@@ -100,7 +100,7 @@ func (d *datastoreImpl) GetAll(q Query, dst interface{}) error {
return fmt.Errorf("invalid GetAll input type: %T", dst)
}
- lme := errors.LazyMultiError{Size: slice.Len()}
+ lme := errors.NewLazyMultiError(slice.Len())
i := 0
err := d.RawInterface.Run(q, func(k Key, pm PropertyMap, _ CursorCB) bool {
slice.Set(reflect.Append(slice, mat.newElem()))
@@ -156,7 +156,7 @@ func (d *datastoreImpl) GetMulti(dst interface{}) error {
return err
}
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
i := 0
meta := NewMultiMetaGetter(pms)
err = d.RawInterface.GetMulti(keys, meta, func(pm PropertyMap, err error) {
@@ -184,7 +184,7 @@ func (d *datastoreImpl) PutMulti(src interface{}) error {
return err
}
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
i := 0
err = d.RawInterface.PutMulti(keys, vals, func(key Key, err error) {
if key != keys[i] {
@@ -201,7 +201,7 @@ func (d *datastoreImpl) PutMulti(src interface{}) error {
}
func (d *datastoreImpl) DeleteMulti(keys []Key) (err error) {
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
i := 0
extErr := d.RawInterface.DeleteMulti(keys, func(internalErr error) {
lme.Assign(i, internalErr)
« no previous file with comments | « service/datastore/checkfilter.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698