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

Side by Side Diff: service/info/wrapper.go

Issue 2062613002: Add TrimmedAppID to info service. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « service/info/interface.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package info
6
7 import (
8 "strings"
9
10 "golang.org/x/net/context"
11 )
12
13 type infoImpl struct {
14 RawInterface
15 }
16
17 var _ Interface = infoImpl{}
18
19 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
20 ret, err := i.Namespace(namespace)
21 if err != nil {
22 panic(err)
23 }
24 return ret
25 }
26
27 func (i infoImpl) TrimmedAppID() string {
28 toks := strings.Split(i.AppID(), ":")
29 return toks[len(toks)-1]
30 }
OLDNEW
« no previous file with comments | « service/info/interface.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698