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

Unified Diff: go/src/infra/gae/libs/wrapper/memory/key.go

Issue 1160253002: Add initial Query generation, correctness checking and index generation. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: address comments and stuff Created 5 years, 7 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
Index: go/src/infra/gae/libs/wrapper/memory/key.go
diff --git a/go/src/infra/gae/libs/wrapper/memory/key.go b/go/src/infra/gae/libs/wrapper/memory/key.go
index 780efa99fd7a1f9391dd46e388171f56473790bf..fa9d656af42b91345031360d4a263e8d1411d90e 100644
--- a/go/src/infra/gae/libs/wrapper/memory/key.go
+++ b/go/src/infra/gae/libs/wrapper/memory/key.go
@@ -104,8 +104,8 @@ func keyBytes(nso nsOption, k *datastore.Key) []byte {
return buf.Bytes()
}
-func keyFromByteString(nso nsOption, d string) (*datastore.Key, error) {
- return readKey(bytes.NewBufferString(d), nso)
+func keyFromByteString(nso nsOption, d string, ns string) (*datastore.Key, error) {
+ return readKey(bytes.NewBufferString(d), nso, ns)
}
func writeKey(buf *bytes.Buffer, nso nsOption, k *datastore.Key) {
@@ -124,8 +124,8 @@ func writeKey(buf *bytes.Buffer, nso nsOption, k *datastore.Key) {
}
}
-func readKey(buf *bytes.Buffer, nso nsOption) (*datastore.Key, error) {
- namespace := ""
+func readKey(buf *bytes.Buffer, nso nsOption, ns string) (*datastore.Key, error) {
+ namespace := ns
if nso == withNS {
err := error(nil)
if namespace, err = readString(buf); err != nil {
« no previous file with comments | « go/src/infra/gae/libs/wrapper/memory/gkvlite_utils_test.go ('k') | go/src/infra/gae/libs/wrapper/memory/key_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698