add --silent global option to remove the stderr logs.

This commit is contained in:
fiatjaf
2023-11-13 15:03:27 -03:00
parent 11fe6b5809
commit 8fbfdc65c8
4 changed files with 27 additions and 10 deletions

2
req.go
View File

@@ -102,7 +102,7 @@ example:
var relays []*nostr.Relay
pool, relays = connectToAllRelays(c.Context, relayUrls)
if len(relays) == 0 {
fmt.Fprintf(os.Stderr, "failed to connect to any of the given relays.\n")
log("failed to connect to any of the given relays.\n")
os.Exit(3)
}
relayUrls = make([]string, len(relays))