remove nson.

it's not being used by anyone and didn't gain enough traction, and also
now I think I have a more efficient way of encoding this, so using that
new scheme in the future will be better than this.
This commit is contained in:
fiatjaf 2024-07-13 10:48:50 -03:00
parent 30ca5776c5
commit 8f51fe757b

View File

@ -12,7 +12,6 @@ import (
"github.com/mailru/easyjson" "github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip19" "github.com/nbd-wtf/go-nostr/nip19"
"github.com/nbd-wtf/go-nostr/nson"
"github.com/urfave/cli/v3" "github.com/urfave/cli/v3"
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
) )
@ -90,10 +89,6 @@ example:
Name: "nevent", Name: "nevent",
Usage: "print the nevent code (to stderr) after the event is published", Usage: "print the nevent code (to stderr) after the event is published",
}, },
&cli.BoolFlag{
Name: "nson",
Usage: "encode the event using NSON",
},
&cli.IntFlag{ &cli.IntFlag{
Name: "kind", Name: "kind",
Aliases: []string{"k"}, Aliases: []string{"k"},
@ -276,8 +271,6 @@ example:
if c.Bool("envelope") { if c.Bool("envelope") {
j, _ := json.Marshal(nostr.EventEnvelope{Event: evt}) j, _ := json.Marshal(nostr.EventEnvelope{Event: evt})
result = string(j) result = string(j)
} else if c.Bool("nson") {
result, _ = nson.Marshal(&evt)
} else { } else {
j, _ := easyjson.Marshal(&evt) j, _ := easyjson.Marshal(&evt)
result = string(j) result = string(j)