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

Unified Diff: service/datastore/pls.go

Issue 1401533007: Add ability to override just the metadata in a struct. (Closed) Base URL: https://github.com/luci/gae.git@add_exists_method
Patch Set: Created 5 years, 2 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 | service/datastore/pls_impl.go » ('j') | service/datastore/pls_impl.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/pls.go
diff --git a/service/datastore/pls.go b/service/datastore/pls.go
index 86613728527adaa902537557c0f750c4fb462033..4fcadbebc4b5a863b13c6df18d6f7237b401b3a2 100644
--- a/service/datastore/pls.go
+++ b/service/datastore/pls.go
@@ -86,6 +86,9 @@ import (
// // 'Lines' will serialized to the datastore in the field 'Lines'
// Lines []string
// }
+//
+// A pointer-to-struct may also implement MetaGetterSetter to provide more
+// sophistocated metadata values.
Vadim Sh. 2015/10/13 04:27:48 note that explicitly defined fields take precedenc
iannucci 2015/10/13 04:34:40 Done.
func GetPLS(obj interface{}) PropertyLoadSaver {
v := reflect.ValueOf(obj)
if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct {
« no previous file with comments | « no previous file | service/datastore/pls_impl.go » ('j') | service/datastore/pls_impl.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698