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

Unified Diff: impl/prod/info.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/prod/doc.go ('k') | impl/prod/memcache.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/info.go
diff --git a/prod/globalinfo.go b/impl/prod/info.go
similarity index 89%
rename from prod/globalinfo.go
rename to impl/prod/info.go
index dfbb7381186ec202720e08365a79b4b4be292d51..c860bc0095bb03138b01a7f74981b5bdce385555 100644
--- a/prod/globalinfo.go
+++ b/impl/prod/info.go
@@ -7,7 +7,7 @@ package prod
import (
"time"
- "github.com/luci/gae"
+ "github.com/luci/gae/service/info"
"golang.org/x/net/context"
"google.golang.org/appengine"
)
@@ -15,7 +15,7 @@ import (
// useGI adds a gae.GlobalInfo implementation to context, accessible
// by gae.GetGI(c)
func useGI(c context.Context) context.Context {
- return gae.SetGIFactory(c, func(ci context.Context) gae.GlobalInfo {
+ return info.SetFactory(c, func(ci context.Context) info.Interface {
return giImpl{ci}
})
}
@@ -55,14 +55,14 @@ func (g giImpl) ModuleName() (name string) {
func (g giImpl) Namespace(namespace string) (context.Context, error) {
return appengine.Namespace(g, namespace)
}
-func (g giImpl) PublicCertificates() ([]gae.GICertificate, error) {
+func (g giImpl) PublicCertificates() ([]info.Certificate, error) {
certs, err := appengine.PublicCertificates(g)
if err != nil {
return nil, err
}
- ret := make([]gae.GICertificate, len(certs))
+ ret := make([]info.Certificate, len(certs))
for i, c := range certs {
- ret[i] = (gae.GICertificate)(c)
+ ret[i] = info.Certificate(c)
}
return ret, nil
}
« no previous file with comments | « impl/prod/doc.go ('k') | impl/prod/memcache.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698