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

@@ -33,7 +33,7 @@ var decode = &cli.Command{
},
ArgsUsage: "<npub | nprofile | nip05 | nevent | naddr | nsec>",
Action: func(c *cli.Context) error {
for input := range getStdinLinesOrFirstArgument(c.Args().First()) {
for input := range getStdinLinesOrArguments(c.Args()) {
if strings.HasPrefix(input, "nostr:") {
input = input[6:]
}