From 4d015e5b29d6c333c049761cfc5c6ac9237d6e35 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Tue, 18 Jun 2019 16:28:30 +0200 Subject: [PATCH] With go modules, we should be able to remove import comments --- auth.go | 2 +- backoff.go | 2 +- check_cert.go | 2 +- client.go | 2 +- client_test.go | 2 +- cmd/xmpp-check/xmpp-check.go | 2 +- component.go | 2 +- component_test.go | 2 +- config.go | 2 +- conn_error.go | 2 +- doc.go | 2 +- go.mod | 2 +- iot_control.go | 2 +- iot_control_test.go | 2 +- iq.go | 2 +- jid.go | 2 +- jid_test.go | 2 +- message.go | 2 +- msg_chat_markers.go | 2 +- msg_chat_state.go | 2 +- msg_oob.go | 2 +- msg_receipts.go | 2 +- ns.go | 2 +- packet.go | 2 +- parser.go | 2 +- pep.go | 4 +--- presence.go | 2 +- pubsub.go | 2 +- registry.go | 2 +- registry_test.go | 2 +- router.go | 2 +- session.go | 2 +- socket_proxy.go | 2 +- starttls.go | 2 +- stream.go | 2 +- stream_manager.go | 2 +- tcp_server_mock.go | 2 +- 37 files changed, 37 insertions(+), 39 deletions(-) diff --git a/auth.go b/auth.go index 5af154a..90b73e5 100644 --- a/auth.go +++ b/auth.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/base64" diff --git a/backoff.go b/backoff.go index bbb399c..caa53d1 100644 --- a/backoff.go +++ b/backoff.go @@ -20,7 +20,7 @@ TODO: Implement Backoff Ticker channel TODO: Implement throttler interface. Throttler could be used to implement various reconnect strategies. */ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "math" diff --git a/check_cert.go b/check_cert.go index 074676e..05e44e1 100644 --- a/check_cert.go +++ b/check_cert.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "crypto/tls" diff --git a/client.go b/client.go index 3cb43cd..2fa6b03 100644 --- a/client.go +++ b/client.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/client_test.go b/client_test.go index f231c97..966e6b8 100644 --- a/client_test.go +++ b/client_test.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/cmd/xmpp-check/xmpp-check.go b/cmd/xmpp-check/xmpp-check.go index f44e861..77af605 100644 --- a/cmd/xmpp-check/xmpp-check.go +++ b/cmd/xmpp-check/xmpp-check.go @@ -1,4 +1,4 @@ -package main // import "gosrc.io/xmpp" +package main import ( "log" diff --git a/component.go b/component.go index 9f319f6..8ae8c2e 100644 --- a/component.go +++ b/component.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "crypto/sha1" diff --git a/component_test.go b/component_test.go index 55c4569..b007c85 100644 --- a/component_test.go +++ b/component_test.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/config.go b/config.go index 92748ac..e37956b 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "io" diff --git a/conn_error.go b/conn_error.go index 773da01..2b1501c 100644 --- a/conn_error.go +++ b/conn_error.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "fmt" diff --git a/doc.go b/doc.go index dbeb5f0..5e1c074 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 "gosrc.io/xmpp" +package xmpp diff --git a/go.mod b/go.mod index 5f54ccf..ebd7205 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module gosrc.io/xmpp -go 1.9 +go 1.12 require ( github.com/google/go-cmp v0.2.0 diff --git a/iot_control.go b/iot_control.go index 5e80957..67a54a1 100644 --- a/iot_control.go +++ b/iot_control.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/iot_control_test.go b/iot_control_test.go index 2a2a027..878b251 100644 --- a/iot_control_test.go +++ b/iot_control_test.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/iq.go b/iq.go index 9cd334a..1b9f127 100644 --- a/iq.go +++ b/iq.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/jid.go b/jid.go index 9d012d9..cee292a 100644 --- a/jid.go +++ b/jid.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "fmt" diff --git a/jid_test.go b/jid_test.go index 502d45f..c6fee03 100644 --- a/jid_test.go +++ b/jid_test.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "testing" diff --git a/message.go b/message.go index 197c6c2..906f6e3 100644 --- a/message.go +++ b/message.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/msg_chat_markers.go b/msg_chat_markers.go index 4c12a3e..b33aa3c 100644 --- a/msg_chat_markers.go +++ b/msg_chat_markers.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import "encoding/xml" diff --git a/msg_chat_state.go b/msg_chat_state.go index 72fca52..7f2f89e 100644 --- a/msg_chat_state.go +++ b/msg_chat_state.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import "encoding/xml" diff --git a/msg_oob.go b/msg_oob.go index 69c8c6e..38b6aeb 100644 --- a/msg_oob.go +++ b/msg_oob.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import "encoding/xml" diff --git a/msg_receipts.go b/msg_receipts.go index 4edc411..87a1f73 100644 --- a/msg_receipts.go +++ b/msg_receipts.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import "encoding/xml" diff --git a/ns.go b/ns.go index 8aa8c71..d36e3db 100644 --- a/ns.go +++ b/ns.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp const ( NSStream = "http://etherx.jabber.org/streams" diff --git a/packet.go b/packet.go index 89ec126..4b6f519 100644 --- a/packet.go +++ b/packet.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp type Packet interface { Name() string diff --git a/parser.go b/parser.go index ddcd526..bc17dd5 100644 --- a/parser.go +++ b/parser.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/pep.go b/pep.go index a3d0497..7223dc4 100644 --- a/pep.go +++ b/pep.go @@ -1,6 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" - -// TODO: Move to a pubsub file +package xmpp import ( "encoding/xml" diff --git a/presence.go b/presence.go index 0cadeaf..64b4738 100644 --- a/presence.go +++ b/presence.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import "encoding/xml" diff --git a/pubsub.go b/pubsub.go index 88e3b35..42b28e0 100644 --- a/pubsub.go +++ b/pubsub.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/registry.go b/registry.go index 82bdf44..e5afcf9 100644 --- a/registry.go +++ b/registry.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/registry_test.go b/registry_test.go index 4b3ba81..63feea3 100644 --- a/registry_test.go +++ b/registry_test.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/router.go b/router.go index 93e76ef..92b1594 100644 --- a/router.go +++ b/router.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "strings" diff --git a/session.go b/session.go index 3bce3cd..04af21f 100644 --- a/session.go +++ b/session.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "crypto/tls" diff --git a/socket_proxy.go b/socket_proxy.go index 6068124..111e302 100644 --- a/socket_proxy.go +++ b/socket_proxy.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "io" diff --git a/starttls.go b/starttls.go index 8c36222..edb20ec 100644 --- a/starttls.go +++ b/starttls.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "crypto/tls" diff --git a/stream.go b/stream.go index 20759ba..0173254 100644 --- a/stream.go +++ b/stream.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "encoding/xml" diff --git a/stream_manager.go b/stream_manager.go index f867e34..0b8cda7 100644 --- a/stream_manager.go +++ b/stream_manager.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "errors" diff --git a/tcp_server_mock.go b/tcp_server_mock.go index f46529f..bdc4397 100644 --- a/tcp_server_mock.go +++ b/tcp_server_mock.go @@ -1,4 +1,4 @@ -package xmpp // import "gosrc.io/xmpp" +package xmpp import ( "net"