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

Unified Diff: filter/featureBreaker/gi.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 | « filter/count/gi.go ('k') | impl/dummy/dummy.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/featureBreaker/gi.go
diff --git a/filter/featureBreaker/gi.go b/filter/featureBreaker/gi.go
index b051b6bbdf6752da5e44d7311de7546fee19ed11..6dc458cb618fe7ec28c719b7832d174a672b22c5 100644
--- a/filter/featureBreaker/gi.go
+++ b/filter/featureBreaker/gi.go
@@ -42,6 +42,14 @@ func (g *infoState) Namespace(namespace string) (ret context.Context, err error)
return
}
+func (g *infoState) MustNamespace(namespace string) context.Context {
+ ret, err := g.Namespace(namespace)
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
func (g *infoState) AccessToken(scopes ...string) (token string, expiry time.Time, err error) {
err = g.run(func() (err error) {
token, expiry, err = g.Interface.AccessToken(scopes...)
« no previous file with comments | « filter/count/gi.go ('k') | impl/dummy/dummy.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698