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

Unified Diff: service/datastore/pls_impl.go

Issue 1270113002: Re-add metadata passthrough on Get operations (Closed) Base URL: https://github.com/luci/gae.git@fix_other_interfaces
Patch Set: cleanup Created 5 years, 4 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 | « service/datastore/multiarg.go ('k') | service/datastore/pls_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/pls_impl.go
diff --git a/service/datastore/pls_impl.go b/service/datastore/pls_impl.go
index 9a369123c59cf58b2431ab169fa568f2638bcfea..717156c90238a3259535b83ba4da6d9fb44e7cc0 100644
--- a/service/datastore/pls_impl.go
+++ b/service/datastore/pls_impl.go
@@ -340,6 +340,10 @@ func (p *structPLS) GetMeta(key string) (interface{}, error) {
return val, nil
}
+func (p *structPLS) GetMetaDefault(key string, def interface{}) interface{} {
+ return GetMetaDefaultImpl(p.GetMeta, key, def)
+}
+
func (p *structPLS) SetMeta(key string, val interface{}) (err error) {
if err = p.Problem(); err != nil {
return
@@ -539,8 +543,7 @@ func getStructCodecLocked(t reflect.Type) (c *structCodec) {
if st.isSlice {
t = t.Elem()
}
- v := reflect.New(t).Elem().Interface()
- v, _ = UpconvertUnderlyingType(v, t)
+ v := UpconvertUnderlyingType(reflect.New(t).Elem().Interface())
if _, err := PropertyTypeOf(v, false); err != nil {
c.problem = me("field %q has invalid type: %s", name, ft)
return
« no previous file with comments | « service/datastore/multiarg.go ('k') | service/datastore/pls_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698