Trim trailing newlines in interactive mode.

This commit is contained in:
Martin Dosch 2023-06-19 21:25:29 +02:00
parent fcaf33a27f
commit cd49a78be9
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D
2 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@
- Use single quotes for attributes in stanzas created by github.com/beevik/etree (vial etree v1.1.4).
- Fix SRV lookup when the domain has a CNAME (via xmppsrv v0.2.5).
- Fall back to directTLS on port 5223 (instead of StartTLS on port 5222) if no SRV records are provided and `-t` is set.
- Remove trailing newlines in interactive mode.
## [v0.5.6] 2022-11-11
### Added

View File

@ -443,6 +443,7 @@ func main() {
reader := bufio.NewReader(os.Stdin)
for {
message, err = reader.ReadString('\n')
message = strings.TrimSuffix(message, "\n")
if errors.Unwrap(err) != nil {
log.Fatal("failed to read from stdin")
}