mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-18 21:25:31 +00:00
Trim trailing newlines in interactive mode.
This commit is contained in:
parent
fcaf33a27f
commit
cd49a78be9
@ -13,6 +13,7 @@
|
|||||||
- Use single quotes for attributes in stanzas created by github.com/beevik/etree (vial etree v1.1.4).
|
- 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).
|
- 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.
|
- 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
|
## [v0.5.6] 2022-11-11
|
||||||
### Added
|
### Added
|
||||||
|
1
main.go
1
main.go
@ -443,6 +443,7 @@ func main() {
|
|||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
for {
|
for {
|
||||||
message, err = reader.ReadString('\n')
|
message, err = reader.ReadString('\n')
|
||||||
|
message = strings.TrimSuffix(message, "\n")
|
||||||
if errors.Unwrap(err) != nil {
|
if errors.Unwrap(err) != nil {
|
||||||
log.Fatal("failed to read from stdin")
|
log.Fatal("failed to read from stdin")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user