|
|
|
|
@ -49,6 +49,7 @@ func (d *D) Export(c context.Context, w io.Writer, pubkeys ...[]byte) {
@@ -49,6 +49,7 @@ func (d *D) Export(c context.Context, w io.Writer, pubkeys ...[]byte) {
|
|
|
|
|
if _, err = w.Write([]byte{'\n'}); chk.E(err) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
ev.Free() |
|
|
|
|
evBuf.Reset() |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
@ -86,14 +87,15 @@ func (d *D) Export(c context.Context, w io.Writer, pubkeys ...[]byte) {
@@ -86,14 +87,15 @@ func (d *D) Export(c context.Context, w io.Writer, pubkeys ...[]byte) {
|
|
|
|
|
if err = ev.UnmarshalBinary(evBuf); chk.E(err) { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
// Serialize the event to JSON and write it to the output
|
|
|
|
|
if _, err = w.Write(ev.Serialize()); chk.E(err) { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
if _, err = w.Write([]byte{'\n'}); chk.E(err) { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
evBuf.Reset() |
|
|
|
|
// Serialize the event to JSON and write it to the output
|
|
|
|
|
if _, err = w.Write(ev.Serialize()); chk.E(err) { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
if _, err = w.Write([]byte{'\n'}); chk.E(err) { |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
ev.Free() |
|
|
|
|
evBuf.Reset() |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
}, |
|
|
|
|
|