LimitZero when -l 0 and when --stream

This commit is contained in:
fiatjaf 2024-03-29 08:16:15 -03:00
parent 8ddb9ce021
commit c3ea9c15f6
2 changed files with 3 additions and 1 deletions

2
go.mod
View File

@ -8,7 +8,7 @@ require (
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/fatih/color v1.16.0 github.com/fatih/color v1.16.0
github.com/mailru/easyjson v0.7.7 github.com/mailru/easyjson v0.7.7
github.com/nbd-wtf/go-nostr v0.29.0 github.com/nbd-wtf/go-nostr v0.30.0
github.com/nbd-wtf/nostr-sdk v0.0.5 github.com/nbd-wtf/nostr-sdk v0.0.5
github.com/urfave/cli/v2 v2.25.7 github.com/urfave/cli/v2 v2.25.7
golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/exp v0.0.0-20231006140011-7918f672742d

2
req.go
View File

@ -246,6 +246,8 @@ example:
} }
if limit := c.Int("limit"); limit != 0 { if limit := c.Int("limit"); limit != 0 {
filter.Limit = limit filter.Limit = limit
} else if c.IsSet("limit") || c.Bool("stream") {
filter.LimitZero = true
} }
if len(relayUrls) > 0 { if len(relayUrls) > 0 {