accept multiple arguments in many commands, add a lot of more tests.

This commit is contained in:
fiatjaf
2024-03-19 11:34:59 -03:00
parent 34c189af28
commit 569d38a137
8 changed files with 152 additions and 38 deletions

View File

@@ -15,7 +15,7 @@ var verify = &cli.Command{
it outputs nothing if the verification is successful.`,
Action: func(c *cli.Context) error {
for stdinEvent := range getStdinLinesOrFirstArgument(c.Args().First()) {
for stdinEvent := range getStdinLinesOrArguments(c.Args()) {
evt := nostr.Event{}
if stdinEvent != "" {
if err := json.Unmarshal([]byte(stdinEvent), &evt); err != nil {