From 441ee9a5ededabd2b83653f2e8ebcd0a32395864 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 5 Jul 2024 00:11:59 -0300 Subject: [PATCH] update go-nostr so just "localhost[:port]" works as a relay url. --- go.mod | 2 +- go.sum | 4 ++-- relay.go | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 34161ea..b81a30c 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 github.com/fatih/color v1.16.0 github.com/mailru/easyjson v0.7.7 - github.com/nbd-wtf/go-nostr v0.31.2 + github.com/nbd-wtf/go-nostr v0.34.0 github.com/nbd-wtf/nostr-sdk v0.0.5 github.com/urfave/cli/v3 v3.0.0-alpha9 golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 diff --git a/go.sum b/go.sum index d6d58fa..767e47c 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/nbd-wtf/go-nostr v0.31.2 h1:PkHCAsSzG0Ce8tfF7LKyvZOjYtCdC+hPh5KfO/Rl1b4= -github.com/nbd-wtf/go-nostr v0.31.2/go.mod h1:vHKtHyLXDXzYBN0fi/9Y/Q5AD0p+hk8TQVKlldAi0gI= +github.com/nbd-wtf/go-nostr v0.34.0 h1:E7tDHFx42gvWwFv1Eysn+NxJqGLmo21x/VEwj2+F21E= +github.com/nbd-wtf/go-nostr v0.34.0/go.mod h1:NZQkxl96ggbO8rvDpVjcsojJqKTPwqhP4i82O7K5DJs= github.com/nbd-wtf/nostr-sdk v0.0.5 h1:rec+FcDizDVO0W25PX0lgYMXvP7zNNOgI3Fu9UCm4BY= github.com/nbd-wtf/nostr-sdk v0.0.5/go.mod h1:iJJsikesCGLNFZ9dLqhLPDzdt924EagUmdQxT3w2Lmk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= diff --git a/relay.go b/relay.go index 0ff9f3d..d0e9e3a 100644 --- a/relay.go +++ b/relay.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "strings" "github.com/nbd-wtf/go-nostr/nip11" "github.com/urfave/cli/v3" @@ -22,10 +21,6 @@ var relay = &cli.Command{ return fmt.Errorf("specify the ") } - if !strings.HasPrefix(url, "wss://") && !strings.HasPrefix(url, "ws://") { - url = "wss://" + url - } - info, err := nip11.Fetch(ctx, url) if err != nil { lineProcessingError(ctx, "failed to fetch '%s' information document: %w", url, err)