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

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

Issue 1229503007: Roll infra/go/src/github.com/luci/luci-go/ to b85c6dd748361e8244122faac44b5beefcd2db37. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: fix tests Created 5 years, 5 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 fa9d656af42b91345031360d4a263e8d1411d90e..c6dd56fba8fb195207b06ff454cdd9d4fa576a8f 100644
--- a/go/src/infra/gae/libs/wrapper/memory/key.go
+++ b/go/src/infra/gae/libs/wrapper/memory/key.go
@@ -10,7 +10,7 @@ import (
"fmt"
"github.com/golang/protobuf/proto"
- "github.com/luci/luci-go/common/funnybase"
+ "github.com/luci/luci-go/common/cmpbin"
"github.com/mjibson/goon"
"appengine"
@@ -114,12 +114,12 @@ func writeKey(buf *bytes.Buffer, nso nsOption, k *datastore.Key) {
if nso == withNS {
writeString(buf, namespace)
}
- funnybase.WriteUint(buf, uint64(len(toks)))
+ cmpbin.WriteUint(buf, uint64(len(toks)))
for _, tok := range toks {
writeString(buf, tok.kind)
writeString(buf, tok.stringID)
if tok.stringID == "" {
- funnybase.WriteUint(buf, tok.intID)
+ cmpbin.WriteUint(buf, tok.intID)
}
}
}
@@ -133,7 +133,7 @@ func readKey(buf *bytes.Buffer, nso nsOption, ns string) (*datastore.Key, error)
}
}
- numToks, err := funnybase.ReadUint(buf)
+ numToks, _, err := cmpbin.ReadUint(buf)
if err != nil {
return nil, err
}
@@ -151,7 +151,7 @@ func readKey(buf *bytes.Buffer, nso nsOption, ns string) (*datastore.Key, error)
return nil, err
}
if tok.stringID == "" {
- if tok.intID, err = funnybase.ReadUint(buf); err != nil {
+ if tok.intID, _, err = cmpbin.ReadUint(buf); err != nil {
return nil, err
}
if tok.intID == 0 {
« no previous file with comments | « go/src/infra/gae/libs/wrapper/memory/datastore_query.go ('k') | go/src/infra/gae/libs/wrapper/memory/plist.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698