Rename Options to Config

This commit is contained in:
Mickael Remond
2018-09-26 16:25:04 +02:00
parent 1c3aaad174
commit fa5590e921
6 changed files with 29 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ import (
)
func main() {
options := xmpp.Options{
config := xmpp.Config{
Address: "localhost:5222",
Jid: "test@localhost",
Password: "test",
@@ -21,7 +21,7 @@ func main() {
Insecure: true,
}
client, err := xmpp.NewClient(options)
client, err := xmpp.NewClient(config)
if err != nil {
log.Fatal("Error: ", err)
}

View File

@@ -99,11 +99,11 @@ func playSCURL(p *mpg123.Player, rawURL string) {
}
func connectXmpp(jid string, password string, address string) (client *xmpp.Client, err error) {
xmppOptions := xmpp.Options{Address: address,
xmppConfig := xmpp.Config{Address: address,
Jid: jid, Password: password, PacketLogger: os.Stdout, Insecure: true,
Retry: 10}
if client, err = xmpp.NewClient(xmppOptions); err != nil {
if client, err = xmpp.NewClient(xmppConfig); err != nil {
return
}