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

Unified Diff: service/mail/context.go

Issue 1525923002: Implement Mail service. (Closed) Base URL: https://github.com/luci/gae.git@filter_user
Patch Set: add tests Created 5 years 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/mail/context.go
diff --git a/service/user/context.go b/service/mail/context.go
similarity index 85%
copy from service/user/context.go
copy to service/mail/context.go
index 21061667e825d2daa91f650b699b345b983fb8f7..d17287c1bdce19b19803f96bd470e277bc206f30 100644
--- a/service/user/context.go
+++ b/service/mail/context.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package user
+package mail
import (
"golang.org/x/net/context"
@@ -19,8 +19,8 @@ var (
// SetFactory.
type Factory func(context.Context) Interface
-// Filter is the function signature for a filter user implementation. It
-// gets the current user implementation, and returns a new user implementation
+// Filter is the function signature for a filter mail implementation. It
+// gets the current mail implementation, and returns a new mail implementation
// backed by the one passed in.
type Filter func(context.Context, Interface) Interface
@@ -41,7 +41,7 @@ func getCurFilters(c context.Context) []Filter {
return nil
}
-// Get pulls the user service implementation from context or nil if it
+// Get pulls the mail service implementation from context or nil if it
// wasn't set.
func Get(c context.Context) Interface {
ret := getUnfiltered(c)
@@ -54,13 +54,13 @@ func Get(c context.Context) Interface {
return ret
}
-// SetFactory sets the function to produce user.Interface instances,
+// SetFactory sets the function to produce mail.Interface instances,
// as returned by the Get method.
func SetFactory(c context.Context, f Factory) context.Context {
return context.WithValue(c, serviceKey, f)
}
-// Set sets the user service in this context. Useful for testing with a quick
+// Set sets the mail service in this context. Useful for testing with a quick
// mock. This is just a shorthand SetFactory invocation to set a factory which
// always returns the same object.
func Set(c context.Context, u Interface) context.Context {

Powered by Google App Engine
This is Rietveld 408576698