Index: service/info/wrapper.go |
diff --git a/service/info/wrapper.go b/service/info/wrapper.go |
new file mode 100644 |
index 0000000000000000000000000000000000000000..76f84af2f7e592dc19bc947994af05b6c420ab22 |
--- /dev/null |
+++ b/service/info/wrapper.go |
@@ -0,0 +1,30 @@ |
+// Copyright 2016 The LUCI Authors. All rights reserved. |
+// Use of this source code is governed under the Apache License, Version 2.0 |
+// that can be found in the LICENSE file. |
+ |
+package info |
+ |
+import ( |
+ "strings" |
+ |
+ "golang.org/x/net/context" |
+) |
+ |
+type infoImpl struct { |
+ RawInterface |
+} |
+ |
+var _ Interface = infoImpl{} |
+ |
+func (i infoImpl) MustNamespace(namespace string) context.Context { |
dnj (Google)
2016/06/11 02:47:38
Any reason *not* to make this a pointer receiver?
iannucci
2016/06/14 00:01:08
double deref for no reason? additional opportuniti
|
+ ret, err := i.Namespace(namespace) |
+ if err != nil { |
+ panic(err) |
+ } |
+ return ret |
+} |
+ |
+func (i infoImpl) TrimmedAppID() string { |
+ toks := strings.Split(i.AppID(), ":") |
+ return toks[len(toks)-1] |
+} |