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

Unified Diff: service/datastore/pls_impl.go

Issue 1550903002: impl/memory: Fix time serialization encoding. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Store PTTime as time.Time internally, ForIndex -> GetIndexTypeAndValue. Created 4 years, 12 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: service/datastore/pls_impl.go
diff --git a/service/datastore/pls_impl.go b/service/datastore/pls_impl.go
index 5f7fe4740d06b5dd585f3444435340cdec8841bd..f8db53bc718160f280dfaa6be968a9b8971eb0ee 100644
--- a/service/datastore/pls_impl.go
+++ b/service/datastore/pls_impl.go
@@ -196,7 +196,7 @@ func loadInner(codec *structCodec, structValue reflect.Value, index int, name st
project = PTGeoPoint
set = func(x interface{}) { v.Set(reflect.ValueOf(x)) }
default:
- panic(fmt.Errorf("helper: impossible: %s", typeMismatchReason(p.value, v)))
+ panic(fmt.Errorf("helper: impossible: %s", typeMismatchReason(p.Value(), v)))
}
case reflect.Slice:
project = PTBytes
@@ -204,12 +204,12 @@ func loadInner(codec *structCodec, structValue reflect.Value, index int, name st
v.SetBytes(reflect.ValueOf(x).Bytes())
}
default:
- panic(fmt.Errorf("helper: impossible: %s", typeMismatchReason(p.value, v)))
+ panic(fmt.Errorf("helper: impossible: %s", typeMismatchReason(p.Value(), v)))
}
pVal, err := p.Project(project)
if err != nil {
- return typeMismatchReason(p.value, v)
+ return typeMismatchReason(p.Value(), v)
}
if overflow != nil && overflow(pVal) {
return fmt.Sprintf("value %v overflows struct field of type %v", pVal, v.Type())
@@ -334,7 +334,7 @@ func (p *structPLS) getMetaFor(idx int) (interface{}, bool) {
if err != nil {
return nil, false
}
- return prop.value, true
+ return prop.Value(), true
}
if !reflect.DeepEqual(reflect.Zero(f.Type()).Interface(), f.Interface()) {

Powered by Google App Engine
This is Rietveld 408576698