mirror of
https://github.com/fiatjaf/nak.git
synced 2025-08-12 22:10:48 -04:00
allow filters with long tags (the 1-char restriction is only a convention, not a rule).
fixes https://github.com/fiatjaf/nak/issues/44
This commit is contained in:
2
count.go
2
count.go
@@ -85,7 +85,7 @@ var count = &cli.Command{
|
||||
tags := make([][]string, 0, 5)
|
||||
for _, tagFlag := range c.StringSlice("tag") {
|
||||
spl := strings.SplitN(tagFlag, "=", 2)
|
||||
if len(spl) == 2 && len(spl[0]) == 1 {
|
||||
if len(spl) == 2 {
|
||||
tags = append(tags, spl)
|
||||
} else {
|
||||
return fmt.Errorf("invalid --tag '%s'", tagFlag)
|
||||
|
2
req.go
2
req.go
@@ -232,7 +232,7 @@ func applyFlagsToFilter(c *cli.Command, filter *nostr.Filter) error {
|
||||
tags := make([][]string, 0, 5)
|
||||
for _, tagFlag := range c.StringSlice("tag") {
|
||||
spl := strings.SplitN(tagFlag, "=", 2)
|
||||
if len(spl) == 2 && len(spl[0]) == 1 {
|
||||
if len(spl) == 2 {
|
||||
tags = append(tags, spl)
|
||||
} else {
|
||||
return fmt.Errorf("invalid --tag '%s'", tagFlag)
|
||||
|
Reference in New Issue
Block a user