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

Unified Diff: service/datastore/key.go

Issue 2036543003: Allow uint16 and uint32 in MakeKey. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@add_default_version_hostname
Patch Set: rebase Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/key.go
diff --git a/service/datastore/key.go b/service/datastore/key.go
index eb71f103c044f3ca6b0d76db6760ae61176a36b7..faa6ab711806ce121f94d13dd638b1cc5b57655d 100644
--- a/service/datastore/key.go
+++ b/service/datastore/key.go
@@ -138,6 +138,10 @@ func MakeKey(aid, ns string, elems ...interface{}) *Key {
t.IntID = int64(x)
case int64:
t.IntID = int64(x)
+ case uint16:
+ t.IntID = int64(x)
+ case uint32:
+ t.IntID = int64(x)
default:
panic(fmt.Errorf("datastore.MakeKey: bad id: %v", x))
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698