this was missing?
This commit is contained in:
+3
-7
@@ -25,7 +25,6 @@ func easyjsonF642ad3eDecodeGithubComNbdWtfGoNostr(in *jlexer.Lexer, out *Event)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
in.Delim('{')
|
in.Delim('{')
|
||||||
var reusableBuffer [64]byte
|
|
||||||
for !in.IsDelim('}') {
|
for !in.IsDelim('}') {
|
||||||
key := in.UnsafeFieldName(true)
|
key := in.UnsafeFieldName(true)
|
||||||
in.WantColon()
|
in.WantColon()
|
||||||
@@ -36,11 +35,9 @@ func easyjsonF642ad3eDecodeGithubComNbdWtfGoNostr(in *jlexer.Lexer, out *Event)
|
|||||||
}
|
}
|
||||||
switch key {
|
switch key {
|
||||||
case "id":
|
case "id":
|
||||||
hex.Decode(reusableBuffer[:], []byte(in.String()))
|
hex.Decode(out.ID[:], []byte(in.String()))
|
||||||
copy(out.ID[:], reusableBuffer[0:32])
|
|
||||||
case "pubkey":
|
case "pubkey":
|
||||||
hex.Decode(reusableBuffer[:], []byte(in.String()))
|
hex.Decode(out.PubKey[:], []byte(in.String()))
|
||||||
copy(out.PubKey[:], reusableBuffer[0:32])
|
|
||||||
case "created_at":
|
case "created_at":
|
||||||
out.CreatedAt = Timestamp(in.Int64())
|
out.CreatedAt = Timestamp(in.Int64())
|
||||||
case "kind":
|
case "kind":
|
||||||
@@ -88,8 +85,7 @@ func easyjsonF642ad3eDecodeGithubComNbdWtfGoNostr(in *jlexer.Lexer, out *Event)
|
|||||||
case "content":
|
case "content":
|
||||||
out.Content = in.String()
|
out.Content = in.String()
|
||||||
case "sig":
|
case "sig":
|
||||||
hex.Decode(reusableBuffer[:], []byte(in.String()))
|
hex.Decode(out.Sig[:], []byte(in.String()))
|
||||||
copy(out.Sig[:], reusableBuffer[0:64])
|
|
||||||
}
|
}
|
||||||
in.WantComma()
|
in.WantComma()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user