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

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

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Created 4 years, 3 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
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 {
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

Powered by Google App Engine
This is Rietveld 408576698