forked from jshiffer/go-xmpp
Rename Options to Config
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user