mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-10-11 05:13:47 +02:00
omit id, pubkey and sig in jsonifying event and they're not present.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package nostr
|
||||
|
||||
import (
|
||||
@@ -110,20 +108,24 @@ func easyjsonF642ad3eEncodeGithubComNbdWtfGoNostr(out *jwriter.Writer, in Event)
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(in.ID)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"pubkey\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.PubKey)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"created_at\":"
|
||||
const prefix string = "\"created_at\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.CreatedAt))
|
||||
}
|
||||
{
|
||||
if in.ID != "" {
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.ID)
|
||||
}
|
||||
}
|
||||
{
|
||||
if in.PubKey != "" {
|
||||
const prefix string = ",\"pubkey\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.PubKey)
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"kind\":"
|
||||
out.RawString(prefix)
|
||||
@@ -162,9 +164,11 @@ func easyjsonF642ad3eEncodeGithubComNbdWtfGoNostr(out *jwriter.Writer, in Event)
|
||||
out.String(in.Content)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"sig\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.Sig)
|
||||
if in.Sig != "" {
|
||||
const prefix string = ",\"sig\":"
|
||||
out.RawString(prefix)
|
||||
out.String(in.Sig)
|
||||
}
|
||||
}
|
||||
{
|
||||
for key, value := range in.extra {
|
||||
|
@@ -1,5 +1,3 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package nostr
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user