OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package memory | 5 package memory |
6 | 6 |
7 import ( | 7 import ( |
8 "fmt" | 8 "fmt" |
9 "regexp" | 9 "regexp" |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 func (gi *giImpl) Namespace(ns string) (ret context.Context, err error) { | 57 func (gi *giImpl) Namespace(ns string) (ret context.Context, err error) { |
58 if !validNamespace.MatchString(ns) { | 58 if !validNamespace.MatchString(ns) { |
59 return nil, fmt.Errorf("appengine: namespace %q does not match /
%s/", ns, validNamespace) | 59 return nil, fmt.Errorf("appengine: namespace %q does not match /
%s/", ns, validNamespace) |
60 } | 60 } |
61 return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil | 61 return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil |
62 } | 62 } |
63 | 63 |
64 func (gi *giImpl) AppID() string { | 64 func (gi *giImpl) AppID() string { |
65 return globalAppID | 65 return globalAppID |
66 } | 66 } |
OLD | NEW |