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

Unified Diff: service/datastore/checkfilter.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 | « filter/dscache/plan.go ('k') | service/datastore/datastore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/checkfilter.go
diff --git a/service/datastore/checkfilter.go b/service/datastore/checkfilter.go
index 4c28307997ebb910a32e076a6f3bd373a8a78924..2dd9ea3b520db3c7221907f96dccbfa41556e849 100644
--- a/service/datastore/checkfilter.go
+++ b/service/datastore/checkfilter.go
@@ -43,7 +43,7 @@ func (tcf *checkFilter) GetMulti(keys []Key, meta MultiMetaGetter, cb GetMultiCB
if cb == nil {
return fmt.Errorf("datastore: GetMulti callback is nil")
}
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
for i, k := range keys {
if KeyIncomplete(k) || !KeyValid(k, true, tcf.aid, tcf.ns) {
lme.Assign(i, ErrInvalidKey)
@@ -68,7 +68,7 @@ func (tcf *checkFilter) PutMulti(keys []Key, vals []PropertyMap, cb PutMultiCB)
if cb == nil {
return fmt.Errorf("datastore: PutMulti callback is nil")
}
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
for i, k := range keys {
if KeyIncomplete(k) {
// use NewKey to avoid going all the way down the stack for this check.
@@ -100,7 +100,7 @@ func (tcf *checkFilter) DeleteMulti(keys []Key, cb DeleteMultiCB) error {
if cb == nil {
return fmt.Errorf("datastore: DeleteMulti callback is nil")
}
- lme := errors.LazyMultiError{Size: len(keys)}
+ lme := errors.NewLazyMultiError(len(keys))
for i, k := range keys {
if KeyIncomplete(k) || !KeyValid(k, false, tcf.aid, tcf.ns) {
lme.Assign(i, ErrInvalidKey)
« no previous file with comments | « filter/dscache/plan.go ('k') | service/datastore/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698