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

Unified Diff: service/datastore/context.go

Issue 1270063003: Make the rest of the services have a similar raw/user interface structure. (Closed) Base URL: https://github.com/luci/gae.git@add_datastore
Patch Set: 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
Index: service/datastore/context.go
diff --git a/service/datastore/context.go b/service/datastore/context.go
index c81f3c98fb143839c6e82603ea10b5cf52d37cc8..93f320c93bc6d1b3e470bd4cca24ba1a976cea41 100644
--- a/service/datastore/context.go
+++ b/service/datastore/context.go
@@ -19,7 +19,7 @@ var (
// SetRawFactory.
type RawFactory func(context.Context) RawInterface
-// RawFilter is the function signature for a filter RDS implementation. It
+// RawFilter is the function signature for a RawFilter implementation. It
// gets the current RDS implementation, and returns a new RDS implementation
// backed by the one passed in.
type RawFilter func(context.Context, RawInterface) RawInterface
@@ -56,9 +56,9 @@ func SetRawFactory(c context.Context, rdsf RawFactory) context.Context {
return context.WithValue(c, rawDatastoreKey, rdsf)
}
-// SetRaw sets the current Datastore object in the context. Useful for testing with
-// a quick mock. This is just a shorthand SetRawFactory invocation to set a factory
-// which always returns the same object.
+// SetRaw sets the current Datastore object in the context. Useful for testing
+// with a quick mock. This is just a shorthand SetRawFactory invocation to set
+// a factory which always returns the same object.
func SetRaw(c context.Context, rds RawInterface) context.Context {
return SetRawFactory(c, func(context.Context) RawInterface { return rds })
}

Powered by Google App Engine
This is Rietveld 408576698