mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-10-23 04:55:35 -07:00
Move address into transport config
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()
This commit is contained in:

committed by
Mickaël Rémond

parent
f8d0e99696
commit
7fa4b06705
@@ -32,8 +32,10 @@ func sendxmpp(cmd *cobra.Command, args []string) {
|
||||
|
||||
var err error
|
||||
client, err := xmpp.NewClient(xmpp.Config{
|
||||
TransportConfiguration: xmpp.TransportConfiguration{
|
||||
Address: viper.GetString("addr"),
|
||||
},
|
||||
Jid: viper.GetString("jid"),
|
||||
Address: viper.GetString("addr"),
|
||||
Credential: xmpp.Password(viper.GetString("password")),
|
||||
}, xmpp.NewRouter())
|
||||
|
||||
|
Reference in New Issue
Block a user