update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations.

This commit is contained in:
Mechiel Lukkien
2023-05-22 14:40:36 +02:00
parent f6ed860ccb
commit e81930ba20
58 changed files with 1970 additions and 1035 deletions

View File

@ -63,7 +63,15 @@ func (ft fieldType) equal(ov, v reflect.Value) (r bool) {
return false
}
for i := 0; i < n; i++ {
if !ft.List.equal(ov.Index(i), v.Index(i)) {
if !ft.ListElem.equal(ov.Index(i), v.Index(i)) {
return false
}
}
return true
case kindArray:
n := ft.ArrayLength
for i := 0; i < n; i++ {
if !ft.ListElem.equal(ov.Index(i), v.Index(i)) {
return false
}
}
@ -78,7 +86,7 @@ func (ft fieldType) equal(ov, v reflect.Value) (r bool) {
}
return bytes.Equal(obuf, buf)
case kindStruct:
for _, f := range ft.Fields {
for _, f := range ft.structFields {
fov := ov.FieldByIndex(f.structField.Index)
fv := v.FieldByIndex(f.structField.Index)
if !f.Type.equal(fov, fv) {