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

Unified Diff: service/datastore/meta/namespaces.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. Created 4 years, 3 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/meta/eg_test.go ('k') | service/datastore/meta/namespaces_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/meta/namespaces.go
diff --git a/service/datastore/meta/namespaces.go b/service/datastore/meta/namespaces.go
index fc2f30ef2566cc36759d8c82aa3ec7412be1583a..051b96469d06cfc869ced2d7dad2cc7b57c962d1 100644
--- a/service/datastore/meta/namespaces.go
+++ b/service/datastore/meta/namespaces.go
@@ -8,7 +8,8 @@ import (
"fmt"
"strings"
- "github.com/luci/gae/service/datastore"
+ ds "github.com/luci/gae/service/datastore"
+
"golang.org/x/net/context"
)
@@ -28,10 +29,10 @@ type NamespacesCallback func(string) error
// callback as "".
// - Other namespaces will have non-zero string IDs.
func Namespaces(c context.Context, cb NamespacesCallback) error {
- q := datastore.NewQuery("__namespace__").KeysOnly(true)
+ q := ds.NewQuery("__namespace__").KeysOnly(true)
// Query our datastore for the full set of namespaces.
- return datastore.Get(c).Run(q, func(k *datastore.Key) error {
+ return ds.Run(c, q, func(k *ds.Key) error {
switch {
case k.IntID() == 1:
return cb("")
@@ -52,7 +53,7 @@ func NamespacesWithPrefix(c context.Context, p string, cb NamespacesCallback) er
return Namespaces(c, func(ns string) error {
if !strings.HasPrefix(ns, p) {
if any {
- return datastore.Stop
+ return ds.Stop
}
return nil
}
« no previous file with comments | « service/datastore/meta/eg_test.go ('k') | service/datastore/meta/namespaces_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698