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

Unified Diff: impl/prod/info.go

Issue 1766593002: Add a MustNamespace that panics if the namespace wasn't valid (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Add MustNamespace to the interface Created 4 years, 9 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/info_test.go ('k') | service/info/interface.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/impl/prod/info.go b/impl/prod/info.go
index f1235585e3e26ae11c52c4d75007ca22d855224c..a4a67a87be21f02c0e3d9e0ec0e8d955b6edb04f 100644
--- a/impl/prod/info.go
+++ b/impl/prod/info.go
@@ -77,6 +77,13 @@ func (g giImpl) Namespace(namespace string) (context.Context, error) {
pc.namespace = namespace
return withProbeCache(usrCtx, &pc), nil
}
+func (g giImpl) MustNamespace(ns string) context.Context {
+ ret, err := g.Namespace(ns)
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
func (g giImpl) PublicCertificates() ([]info.Certificate, error) {
certs, err := appengine.PublicCertificates(g.aeCtx)
if err != nil {
« no previous file with comments | « impl/memory/info_test.go ('k') | service/info/interface.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698