diff --git a/README.md b/README.md index d0ba804..af0e315 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Go XMPP library -[![Codeship Status for FluuxIO/xmpp](https://app.codeship.com/projects/dba7f300-d145-0135-6c51-26e28af241d2/status?branch=master)](https://app.codeship.com/projects/262399) [![GoDoc](https://godoc.org/fluux.io/xmpp?status.svg)](https://godoc.org/fluux.io/xmpp) [![GoReportCard](https://goreportcard.com/badge/fluux.io/xmpp)](https://goreportcard.com/report/fluux.io/xmpp) [![codecov](https://codecov.io/gh/FluuxIO/xmpp/branch/master/graph/badge.svg)](https://codecov.io/gh/FluuxIO/xmpp) +[![Codeship Status for FluuxIO/xmpp](https://app.codeship.com/projects/dba7f300-d145-0135-6c51-26e28af241d2/status?branch=master)](https://app.codeship.com/projects/262399) [![GoDoc](https://godoc.org/gosrc.io/xmpp?status.svg)](https://godoc.org/gosrc.io/xmpp) [![GoReportCard](https://goreportcard.com/badge/gosrc.io/xmpp)](https://goreportcard.com/report/fluux.io/xmpp) [![codecov](https://codecov.io/gh/FluuxIO/xmpp/branch/master/graph/badge.svg)](https://codecov.io/gh/FluuxIO/xmpp) Fluux XMPP is a Go XMPP library, focusing on simplicity, simple automation, and IoT. diff --git a/auth.go b/auth.go index 9474817..66ac983 100644 --- a/auth.go +++ b/auth.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/base64" diff --git a/client.go b/client.go index 3ef21ff..d167341 100644 --- a/client.go +++ b/client.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "bytes" diff --git a/client_test.go b/client_test.go index a4ee4d0..85b9868 100644 --- a/client_test.go +++ b/client_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/cmd/xmpp_component/xmpp_component.go b/cmd/xmpp_component/xmpp_component.go index 6dfe8de..d433474 100644 --- a/cmd/xmpp_component/xmpp_component.go +++ b/cmd/xmpp_component/xmpp_component.go @@ -3,13 +3,13 @@ package main import ( "fmt" - "fluux.io/xmpp" + "gosrc.io/xmpp" ) func main() { component := MyComponent{Name: "Test Component", Category: "gateway", Type: "service"} component.xmpp = &xmpp.Component{Host: "service.localhost", Secret: "mypass"} - component.xmpp.Connect("localhost:8888") + _ = component.xmpp.Connect("localhost:8888") for { packet, err := component.xmpp.ReadPacket() @@ -39,7 +39,7 @@ func main() { Type: "cancel", } reply := p.MakeError(xError) - component.xmpp.Send(&reply) + _ = component.xmpp.Send(&reply) } case xmpp.Message: @@ -83,7 +83,7 @@ func DiscoResult(c MyComponent, attrs xmpp.PacketAttrs, info *xmpp.DiscoInfo) { } iq.AddPayload(&payload) - c.xmpp.Send(iq) + _ = c.xmpp.Send(iq) } func DiscoItems(c MyComponent, attrs xmpp.PacketAttrs, items *xmpp.DiscoItems) { @@ -98,5 +98,5 @@ func DiscoItems(c MyComponent, attrs xmpp.PacketAttrs, items *xmpp.DiscoItems) { } } iq.AddPayload(&payload) - c.xmpp.Send(iq) + _ = c.xmpp.Send(iq) } diff --git a/cmd/xmpp_echo/xmpp_echo.go b/cmd/xmpp_echo/xmpp_echo.go index 5e1024f..ab0a367 100644 --- a/cmd/xmpp_echo/xmpp_echo.go +++ b/cmd/xmpp_echo/xmpp_echo.go @@ -9,7 +9,7 @@ import ( "log" "os" - "fluux.io/xmpp" + "gosrc.io/xmpp" ) func main() { @@ -37,11 +37,11 @@ func main() { for packet := range client.Recv() { switch packet := packet.(type) { case *xmpp.Message: - fmt.Fprintf(os.Stdout, "Body = %s - from = %s\n", packet.Body, packet.From) + _, _ = fmt.Fprintf(os.Stdout, "Body = %s - from = %s\n", packet.Body, packet.From) reply := xmpp.Message{PacketAttrs: xmpp.PacketAttrs{To: packet.From}, Body: packet.Body} - client.Send(reply) + _ = client.Send(reply) default: - fmt.Fprintf(os.Stdout, "Ignoring packet: %T\n", packet) + _, _ = fmt.Fprintf(os.Stdout, "Ignoring packet: %T\n", packet) } } } diff --git a/cmd/xmpp_jukebox/xmpp_jukebox.go b/cmd/xmpp_jukebox/xmpp_jukebox.go index dd51a51..bd3e610 100644 --- a/cmd/xmpp_jukebox/xmpp_jukebox.go +++ b/cmd/xmpp_jukebox/xmpp_jukebox.go @@ -9,11 +9,11 @@ import ( "os" "strings" - "fluux.io/xmpp" - "fluux.io/xmpp/iot" - "fluux.io/xmpp/pep" "github.com/processone/mpg123" "github.com/processone/soundcloud" + "gosrc.io/xmpp" + "gosrc.io/xmpp/iot" + "gosrc.io/xmpp/pep" ) // Get the actual song Stream URL from SoundCloud website song URL and play it with mpg123 player. @@ -47,7 +47,7 @@ func main() { case xmpp.Presence: // Do nothing with received presence default: - fmt.Fprintf(os.Stdout, "Ignoring packet: %T\n", packet) + _, _ = fmt.Fprintf(os.Stdout, "Ignoring packet: %T\n", packet) } } } @@ -77,17 +77,17 @@ func processIq(client *xmpp.Client, p *mpg123.Player, packet *xmpp.IQ) { playSCURL(p, url) setResponse := new(iot.ControlSetResponse) reply := xmpp.IQ{PacketAttrs: xmpp.PacketAttrs{To: packet.From, Type: "result", Id: packet.Id}, Payload: []xmpp.IQPayload{setResponse}} - client.Send(reply) + _ = client.Send(reply) // TODO add Soundclound artist / title retrieval sendUserTune(client, "Radiohead", "Spectre") default: - fmt.Fprintf(os.Stdout, "Other IQ Payload: %T\n", packet.Payload) + _, _ = fmt.Fprintf(os.Stdout, "Other IQ Payload: %T\n", packet.Payload) } } func sendUserTune(client *xmpp.Client, artist string, title string) { tune := pep.Tune{Artist: artist, Title: title} - client.SendRaw(tune.XMPPFormat()) + _ = client.SendRaw(tune.XMPPFormat()) } func playSCURL(p *mpg123.Player, rawURL string) { @@ -95,7 +95,7 @@ func playSCURL(p *mpg123.Player, rawURL string) { // TODO: Maybe we need to check the track itself to get the stream URL from reply ? url := soundcloud.FormatStreamURL(songID) - p.Play(url) + _ = p.Play(url) } func connectXmpp(jid string, password string, address string) (client *xmpp.Client, err error) { diff --git a/component.go b/component.go index d14bf46..09bf3df 100644 --- a/component.go +++ b/component.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "crypto/sha1" diff --git a/component_test.go b/component_test.go index e23b816..690d962 100644 --- a/component_test.go +++ b/component_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import "testing" diff --git a/config.go b/config.go index 21dc262..a9f878b 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import "os" diff --git a/control_test.go b/control_test.go index 5c2ec01..8cfca32 100644 --- a/control_test.go +++ b/control_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/doc.go b/doc.go index fde621f..dbeb5f0 100644 --- a/doc.go +++ b/doc.go @@ -29,4 +29,4 @@ Fluux XMPP has been primarily tested with ejabberd (https://www.ejabberd.im) but it should work with any XMPP compliant server. */ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" diff --git a/iot/control.go b/iot/control.go index 3f5673f..580f26a 100644 --- a/iot/control.go +++ b/iot/control.go @@ -1,4 +1,4 @@ -package iot // import "fluux.io/xmpp/iot" +package iot // import "gosrc.io/xmpp/iot" import "encoding/xml" diff --git a/iq.go b/iq.go index 7740d6a..30990f9 100644 --- a/iq.go +++ b/iq.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/iq_test.go b/iq_test.go index 439a862..959a602 100644 --- a/iq_test.go +++ b/iq_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/jid.go b/jid.go index 3bc7507..c88e5b4 100644 --- a/jid.go +++ b/jid.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "errors" @@ -22,7 +22,7 @@ func NewJid(sjid string) (jid *Jid, err error) { s2 := strings.Split(s1[1], "/") if len(s2) > 2 { - err = errors.New("invalid JID: " + sjid) + err = errors.New("invalid JID: " + sjidd) return } jid.domain = s2[0] diff --git a/jid_test.go b/jid_test.go index 66f9871..589fa82 100644 --- a/jid_test.go +++ b/jid_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "testing" diff --git a/message.go b/message.go index 36aec8e..a9e108e 100644 --- a/message.go +++ b/message.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/message_test.go b/message_test.go index 1cb0adf..888205c 100644 --- a/message_test.go +++ b/message_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/ns.go b/ns.go index 9cd162c..8aa8c71 100644 --- a/ns.go +++ b/ns.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" const ( NSStream = "http://etherx.jabber.org/streams" diff --git a/packet.go b/packet.go index ca42d6c..89ec126 100644 --- a/packet.go +++ b/packet.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" type Packet interface { Name() string diff --git a/parser.go b/parser.go index 1142976..898d408 100644 --- a/parser.go +++ b/parser.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/pep/user_tune.go b/pep/user_tune.go index 70b4b47..cacba1e 100644 --- a/pep/user_tune.go +++ b/pep/user_tune.go @@ -1,4 +1,4 @@ -package pep // import "fluux.io/xmpp/pep" +package pep // import "gosrc.io/xmpp/pep" import ( "encoding/xml" diff --git a/presence.go b/presence.go index 77600a5..0ec6b6a 100644 --- a/presence.go +++ b/presence.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import "encoding/xml" diff --git a/presence_test.go b/presence_test.go index f5eb33c..388ab6a 100644 --- a/presence_test.go +++ b/presence_test.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/session.go b/session.go index bdeb75c..a058183 100644 --- a/session.go +++ b/session.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "crypto/tls" diff --git a/socket_proxy.go b/socket_proxy.go index 5fe0367..49f2f8e 100644 --- a/socket_proxy.go +++ b/socket_proxy.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "io" diff --git a/starttls.go b/starttls.go index 9e034b2..28149b7 100644 --- a/starttls.go +++ b/starttls.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "crypto/tls" diff --git a/stream.go b/stream.go index 0e29bda..3b48db0 100644 --- a/stream.go +++ b/stream.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "encoding/xml" diff --git a/tcp_server_mock.go b/tcp_server_mock.go index 8f86e08..f46529f 100644 --- a/tcp_server_mock.go +++ b/tcp_server_mock.go @@ -1,4 +1,4 @@ -package xmpp // import "fluux.io/xmpp" +package xmpp // import "gosrc.io/xmpp" import ( "net"