fix handling multiple lines in event (broken in previous commit).

This commit is contained in:
fiatjaf 2023-12-07 18:14:26 -03:00
parent 4d75605c20
commit 30dbe2c1c0
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -117,6 +117,7 @@ example:
doAuth := c.Bool("auth") doAuth := c.Bool("auth")
// then process input and generate events // then process input and generate events
nextline:
for stdinEvent := range getStdinLinesOrBlank() { for stdinEvent := range getStdinLinesOrBlank() {
evt := nostr.Event{ evt := nostr.Event{
Tags: make(nostr.Tags, 0, 3), Tags: make(nostr.Tags, 0, 3),
@ -228,7 +229,7 @@ example:
if err == nil { if err == nil {
// published fine probably // published fine probably
log("%s.\n", status) log("%s.\n", status)
goto end continue nextline
} }
// error publishing // error publishing
@ -254,7 +255,6 @@ example:
} }
} }
end:
exitIfLineProcessingError(c) exitIfLineProcessingError(c)
return nil return nil
}, },