[golangci-lint]: Simplify code.

errwrp
Martin Dosch 1 year ago
parent 2cba774eff
commit 5e26b4e70b
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -51,18 +51,15 @@ func connect(options xmpp.Options, directTLS bool) (*xmpp.Client, error) {
options.NoTLS = false
options.StartTLS = false
options.Host = net.JoinHostPort(server, "5223")
// Connect to server
client, err := options.NewClient()
return client, err
} else {
// Try port 5222 if no xmpp-client SRV records are provided and directTLS is not set.
options.NoTLS = true
options.StartTLS = true
options.Host = net.JoinHostPort(server, "5222")
// Connect to server
client, err := options.NewClient()
return client, err
}
// Connect to server
client, err := options.NewClient()
return client, err
}
// Connect to server
client, err := options.NewClient()

Loading…
Cancel
Save