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

Unified Diff: impl/memory/globalinfo.go

Issue 1243323002: Refactor a bit. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix golint Created 5 years, 5 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 | « impl/memory/gkvlite_utils_test.go ('k') | impl/memory/memcache.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/globalinfo.go
diff --git a/memory/globalinfo.go b/impl/memory/globalinfo.go
similarity index 82%
rename from memory/globalinfo.go
rename to impl/memory/globalinfo.go
index 39b1e126b877284685b78b702f8269062829c8d0..f5a21b1969359b7bf2484d121c02d0b38f7b9776 100644
--- a/memory/globalinfo.go
+++ b/impl/memory/globalinfo.go
@@ -7,8 +7,8 @@ package memory
import (
"golang.org/x/net/context"
- "github.com/luci/gae"
- "github.com/luci/gae/dummy"
+ "github.com/luci/gae/impl/dummy"
+ "github.com/luci/gae/service/info"
)
type giContextKeyType int
@@ -22,8 +22,8 @@ func curGID(c context.Context) *globalInfoData {
// useGI adds a gae.GlobalInfo context, accessible
// by gae.GetGI(c)
func useGI(c context.Context) context.Context {
- return gae.SetGIFactory(c, func(ic context.Context) gae.GlobalInfo {
- return &giImpl{dummy.GI(), curGID(ic), ic}
+ return info.SetFactory(c, func(ic context.Context) info.Interface {
+ return &giImpl{dummy.Info(), curGID(ic), ic}
})
}
@@ -38,12 +38,12 @@ type globalInfoData struct {
}
type giImpl struct {
- gae.GlobalInfo
+ info.Interface
*globalInfoData
c context.Context
}
-var _ = gae.GlobalInfo((*giImpl)(nil))
+var _ = info.Interface((*giImpl)(nil))
func (gi *giImpl) Namespace(ns string) (ret context.Context, err error) {
return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil
« no previous file with comments | « impl/memory/gkvlite_utils_test.go ('k') | impl/memory/memcache.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698