close channel in getStdinLinesOrFirstArgument()

This commit is contained in:
fiatjaf 2023-11-08 22:54:52 -03:00
parent 4fdd80670a
commit 795e98bc2e
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -39,6 +39,7 @@ func getStdinLinesOrFirstArgument(c *cli.Context) chan string {
if target != "" { if target != "" {
single := make(chan string, 1) single := make(chan string, 1)
single <- target single <- target
close(single)
return single return single
} }