do not print a bunch of zeroes when serializing event pointers with empty author.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package nostr
|
||||
|
||||
import (
|
||||
@@ -204,7 +202,7 @@ func easyjson33014d6eEncodeFiatjafComNostr1(out *jwriter.Writer, in EventPointer
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if true {
|
||||
if in.Author != ZeroPK {
|
||||
const prefix string = ",\"author\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.Author.Hex())
|
||||
@@ -311,12 +309,12 @@ func easyjson33014d6eEncodeFiatjafComNostr2(out *jwriter.Writer, in EntityPointe
|
||||
out.RawString(prefix[1:])
|
||||
out.String(in.PublicKey.Hex())
|
||||
}
|
||||
if in.Kind != 0 {
|
||||
{
|
||||
const prefix string = ",\"kind\":"
|
||||
out.RawString(prefix)
|
||||
out.Uint(uint(in.Kind))
|
||||
}
|
||||
if in.Identifier != "" {
|
||||
{
|
||||
const prefix string = ",\"identifier\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.Identifier)
|
||||
|
||||
Reference in New Issue
Block a user