diff --git a/appservice/consumers/roomserver.go b/appservice/consumers/roomserver.go index 10e0489a3..f8cb1364c 100644 --- a/appservice/consumers/roomserver.go +++ b/appservice/consumers/roomserver.go @@ -16,6 +16,7 @@ package consumers import ( "context" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/appservice/storage" diff --git a/appservice/inthttp/server.go b/appservice/inthttp/server.go index b7f1c72bf..66c290b1c 100644 --- a/appservice/inthttp/server.go +++ b/appservice/inthttp/server.go @@ -1,9 +1,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/appservice/api" "github.com/matrix-org/dendrite/internal/httputil" diff --git a/appservice/storage/postgres/appservice_events_table.go b/appservice/storage/postgres/appservice_events_table.go index f8a00ac4b..3a2c4db98 100644 --- a/appservice/storage/postgres/appservice_events_table.go +++ b/appservice/storage/postgres/appservice_events_table.go @@ -18,9 +18,10 @@ package postgres import ( "context" "database/sql" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" log "github.com/sirupsen/logrus" ) diff --git a/appservice/storage/sqlite3/appservice_events_table.go b/appservice/storage/sqlite3/appservice_events_table.go index bbbf65e50..a88432a40 100644 --- a/appservice/storage/sqlite3/appservice_events_table.go +++ b/appservice/storage/sqlite3/appservice_events_table.go @@ -18,9 +18,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/gomatrixserverlib" log "github.com/sirupsen/logrus" diff --git a/appservice/workers/transaction_scheduler.go b/appservice/workers/transaction_scheduler.go index c50247425..e93ece5e8 100644 --- a/appservice/workers/transaction_scheduler.go +++ b/appservice/workers/transaction_scheduler.go @@ -17,13 +17,14 @@ package workers import ( "bytes" "context" - json "github.com/json-iterator/go" "fmt" "math" "net/http" "net/url" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/appservice/storage" "github.com/matrix-org/dendrite/appservice/types" "github.com/matrix-org/dendrite/internal/config" diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index 83e3d1c4a..c94ed764b 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -16,9 +16,10 @@ package auth import ( "context" - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/userapi/api" diff --git a/clientapi/auth/user_interactive_test.go b/clientapi/auth/user_interactive_test.go index 08a2e2188..04b242b33 100644 --- a/clientapi/auth/user_interactive_test.go +++ b/clientapi/auth/user_interactive_test.go @@ -2,10 +2,11 @@ package auth import ( "context" - json "github.com/json-iterator/go" "fmt" "testing" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/clientapi/httputil/httputil.go b/clientapi/httputil/httputil.go index fbe13e41e..4be8202c4 100644 --- a/clientapi/httputil/httputil.go +++ b/clientapi/httputil/httputil.go @@ -15,11 +15,12 @@ package httputil import ( - json "github.com/json-iterator/go" "io/ioutil" "net/http" "unicode/utf8" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/util" ) diff --git a/clientapi/jsonerror/jsonerror_test.go b/clientapi/jsonerror/jsonerror_test.go index 606c53eb8..697de5584 100644 --- a/clientapi/jsonerror/jsonerror_test.go +++ b/clientapi/jsonerror/jsonerror_test.go @@ -15,8 +15,9 @@ package jsonerror import ( - json "github.com/json-iterator/go" "testing" + + json "github.com/json-iterator/go" ) func TestLimitExceeded(t *testing.T) { diff --git a/clientapi/routing/account_data.go b/clientapi/routing/account_data.go index 2b884523c..60f235d19 100644 --- a/clientapi/routing/account_data.go +++ b/clientapi/routing/account_data.go @@ -16,10 +16,11 @@ package routing import ( "fmt" - json "github.com/json-iterator/go" "io/ioutil" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/clientapi/producers" diff --git a/clientapi/routing/createroom.go b/clientapi/routing/createroom.go index 7ff816d95..97cd2b93e 100644 --- a/clientapi/routing/createroom.go +++ b/clientapi/routing/createroom.go @@ -15,12 +15,13 @@ package routing import ( - json "github.com/json-iterator/go" "fmt" "net/http" "strings" "time" + json "github.com/json-iterator/go" + appserviceAPI "github.com/matrix-org/dendrite/appservice/api" roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" roomserverVersion "github.com/matrix-org/dendrite/roomserver/version" diff --git a/clientapi/routing/keys.go b/clientapi/routing/keys.go index 71ec3a021..2daa60ef8 100644 --- a/clientapi/routing/keys.go +++ b/clientapi/routing/keys.go @@ -15,10 +15,11 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/keyserver/api" diff --git a/clientapi/routing/memberships.go b/clientapi/routing/memberships.go index bb7891c48..7981812d6 100644 --- a/clientapi/routing/memberships.go +++ b/clientapi/routing/memberships.go @@ -15,9 +15,10 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index edf361c3f..ad02ba2a0 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -19,7 +19,6 @@ import ( "context" "crypto/hmac" "crypto/sha1" - json "github.com/json-iterator/go" "errors" "fmt" "io/ioutil" @@ -32,6 +31,8 @@ import ( "sync" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" diff --git a/clientapi/routing/room_tagging.go b/clientapi/routing/room_tagging.go index a47a76809..905f4d0a4 100644 --- a/clientapi/routing/room_tagging.go +++ b/clientapi/routing/room_tagging.go @@ -15,9 +15,10 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/sirupsen/logrus" "github.com/matrix-org/dendrite/clientapi/httputil" diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index d0f8d25c5..da737e24f 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -15,10 +15,11 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" "strings" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" appserviceAPI "github.com/matrix-org/dendrite/appservice/api" "github.com/matrix-org/dendrite/clientapi/api" diff --git a/clientapi/routing/sendtodevice.go b/clientapi/routing/sendtodevice.go index b22598dc8..975520765 100644 --- a/clientapi/routing/sendtodevice.go +++ b/clientapi/routing/sendtodevice.go @@ -13,9 +13,10 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/eduserver/api" diff --git a/clientapi/routing/state.go b/clientapi/routing/state.go index c07a94159..c2f622048 100644 --- a/clientapi/routing/state.go +++ b/clientapi/routing/state.go @@ -16,10 +16,11 @@ package routing import ( "context" - json "github.com/json-iterator/go" "fmt" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/roomserver/api" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go index 008f8aaf4..0c1c02d72 100644 --- a/clientapi/threepid/invites.go +++ b/clientapi/threepid/invites.go @@ -16,7 +16,6 @@ package threepid import ( "context" - json "github.com/json-iterator/go" "errors" "fmt" "net/http" @@ -24,6 +23,8 @@ import ( "strings" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/eventutil" diff --git a/clientapi/threepid/threepid.go b/clientapi/threepid/threepid.go index 85fa1e5dd..75e580db2 100644 --- a/clientapi/threepid/threepid.go +++ b/clientapi/threepid/threepid.go @@ -16,7 +16,6 @@ package threepid import ( "context" - json "github.com/json-iterator/go" "errors" "fmt" "net/http" @@ -24,6 +23,8 @@ import ( "strconv" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/config" ) diff --git a/cmd/create-room-events/main.go b/cmd/create-room-events/main.go index f572eca48..a0791a2d2 100644 --- a/cmd/create-room-events/main.go +++ b/cmd/create-room-events/main.go @@ -18,13 +18,14 @@ package main import ( "encoding/base64" - json "github.com/json-iterator/go" "flag" "fmt" "os" "strings" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "golang.org/x/crypto/ed25519" diff --git a/cmd/dendrite-demo-libp2p/publicrooms.go b/cmd/dendrite-demo-libp2p/publicrooms.go index 1807e4c81..d3b333409 100644 --- a/cmd/dendrite-demo-libp2p/publicrooms.go +++ b/cmd/dendrite-demo-libp2p/publicrooms.go @@ -16,12 +16,13 @@ package main import ( "context" - json "github.com/json-iterator/go" "fmt" "sync" "sync/atomic" "time" + json "github.com/json-iterator/go" + roomserverAPI "github.com/matrix-org/dendrite/roomserver/api" pubsub "github.com/libp2p/go-libp2p-pubsub" diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/node.go b/cmd/dendrite-demo-yggdrasil/yggconn/node.go index 012853ee4..c808e5242 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/node.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/node.go @@ -19,7 +19,6 @@ import ( "crypto/ed25519" "crypto/tls" "encoding/hex" - json "github.com/json-iterator/go" "fmt" "io/ioutil" "log" @@ -29,6 +28,8 @@ import ( "sync" "time" + json "github.com/json-iterator/go" + "github.com/lucas-clemente/quic-go" "github.com/matrix-org/dendrite/cmd/dendrite-demo-yggdrasil/convert" "github.com/matrix-org/gomatrixserverlib" diff --git a/cmd/furl/main.go b/cmd/furl/main.go index 10f766ab2..2df6458d5 100644 --- a/cmd/furl/main.go +++ b/cmd/furl/main.go @@ -5,7 +5,6 @@ import ( "bytes" "context" "crypto/ed25519" - json "github.com/json-iterator/go" "encoding/pem" "flag" "fmt" @@ -13,6 +12,8 @@ import ( "net/url" "os" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" ) diff --git a/cmd/syncserver-integration-tests/main.go b/cmd/syncserver-integration-tests/main.go index 0e7404a64..dd3bafdfa 100644 --- a/cmd/syncserver-integration-tests/main.go +++ b/cmd/syncserver-integration-tests/main.go @@ -15,7 +15,6 @@ package main import ( - json "github.com/json-iterator/go" "fmt" "io/ioutil" "net/http" @@ -24,6 +23,8 @@ import ( "path/filepath" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/test" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/eduserver/api/wrapper.go b/eduserver/api/wrapper.go index 431e0c459..fcaf1580b 100644 --- a/eduserver/api/wrapper.go +++ b/eduserver/api/wrapper.go @@ -16,9 +16,10 @@ package api import ( "context" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" ) diff --git a/eduserver/input/input.go b/eduserver/input/input.go index c31190c3a..723166348 100644 --- a/eduserver/input/input.go +++ b/eduserver/input/input.go @@ -18,9 +18,10 @@ package input import ( "context" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/eduserver/cache" diff --git a/eduserver/inthttp/server.go b/eduserver/inthttp/server.go index 00e0624e6..66d142397 100644 --- a/eduserver/inthttp/server.go +++ b/eduserver/inthttp/server.go @@ -1,9 +1,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/internal/httputil" diff --git a/federationapi/routing/backfill.go b/federationapi/routing/backfill.go index 90f93b565..621832f3d 100644 --- a/federationapi/routing/backfill.go +++ b/federationapi/routing/backfill.go @@ -15,12 +15,13 @@ package routing import ( - json "github.com/json-iterator/go" "fmt" "net/http" "strconv" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/federationapi/routing/devices.go b/federationapi/routing/devices.go index 9489854c5..601125125 100644 --- a/federationapi/routing/devices.go +++ b/federationapi/routing/devices.go @@ -13,9 +13,10 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" keyapi "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/federationapi/routing/events.go b/federationapi/routing/events.go index ecc78161d..d7e5832c8 100644 --- a/federationapi/routing/events.go +++ b/federationapi/routing/events.go @@ -16,10 +16,11 @@ package routing import ( "context" - json "github.com/json-iterator/go" "net/http" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/federationapi/routing/invite.go b/federationapi/routing/invite.go index 433060690..3bc042024 100644 --- a/federationapi/routing/invite.go +++ b/federationapi/routing/invite.go @@ -16,10 +16,11 @@ package routing import ( "context" - json "github.com/json-iterator/go" "fmt" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/federationapi/routing/keys.go b/federationapi/routing/keys.go index 647f732b8..cc9e8768c 100644 --- a/federationapi/routing/keys.go +++ b/federationapi/routing/keys.go @@ -15,10 +15,11 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api" diff --git a/federationapi/routing/missingevents.go b/federationapi/routing/missingevents.go index 1893eb91e..631868a26 100644 --- a/federationapi/routing/missingevents.go +++ b/federationapi/routing/missingevents.go @@ -13,9 +13,10 @@ package routing import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 222768df6..ec7d5048f 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -18,11 +18,12 @@ import ( "context" "database/sql" "fmt" - json "github.com/json-iterator/go" "net/http" "sync" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" eduserverAPI "github.com/matrix-org/dendrite/eduserver/api" "github.com/matrix-org/dendrite/internal/config" diff --git a/federationapi/routing/send_test.go b/federationapi/routing/send_test.go index 0f814ed50..60f9f2446 100644 --- a/federationapi/routing/send_test.go +++ b/federationapi/routing/send_test.go @@ -2,12 +2,13 @@ package routing import ( "context" - json "github.com/json-iterator/go" "fmt" "reflect" "testing" "time" + json "github.com/json-iterator/go" + eduAPI "github.com/matrix-org/dendrite/eduserver/api" fsAPI "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/test" diff --git a/federationapi/routing/threepid.go b/federationapi/routing/threepid.go index 4045ab482..f3b0fd17e 100644 --- a/federationapi/routing/threepid.go +++ b/federationapi/routing/threepid.go @@ -16,11 +16,12 @@ package routing import ( "context" - json "github.com/json-iterator/go" "errors" "net/http" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/httputil" "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" diff --git a/federationsender/consumers/eduserver.go b/federationsender/consumers/eduserver.go index 85a8481c0..82f99df16 100644 --- a/federationsender/consumers/eduserver.go +++ b/federationsender/consumers/eduserver.go @@ -17,6 +17,7 @@ package consumers import ( "context" "fmt" + json "github.com/json-iterator/go" "github.com/Shopify/sarama" diff --git a/federationsender/consumers/keychange.go b/federationsender/consumers/keychange.go index dd5f1dea4..ae1bef601 100644 --- a/federationsender/consumers/keychange.go +++ b/federationsender/consumers/keychange.go @@ -16,9 +16,10 @@ package consumers import ( "context" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/storage" diff --git a/federationsender/consumers/roomserver.go b/federationsender/consumers/roomserver.go index ccf3ba843..5d9b2707d 100644 --- a/federationsender/consumers/roomserver.go +++ b/federationsender/consumers/roomserver.go @@ -16,9 +16,10 @@ package consumers import ( "context" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/federationsender/queue" "github.com/matrix-org/dendrite/federationsender/storage" diff --git a/federationsender/inthttp/server.go b/federationsender/inthttp/server.go index 3dc4af054..36708905d 100644 --- a/federationsender/inthttp/server.go +++ b/federationsender/inthttp/server.go @@ -1,9 +1,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/httputil" diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index 21a298c19..b6982647b 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -16,11 +16,12 @@ package queue import ( "context" - json "github.com/json-iterator/go" "fmt" "sync" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/federationsender/statistics" "github.com/matrix-org/dendrite/federationsender/storage" "github.com/matrix-org/dendrite/federationsender/storage/shared" diff --git a/federationsender/queue/queue.go b/federationsender/queue/queue.go index 4b76f621f..907c80091 100644 --- a/federationsender/queue/queue.go +++ b/federationsender/queue/queue.go @@ -17,11 +17,12 @@ package queue import ( "context" "crypto/ed25519" - json "github.com/json-iterator/go" "fmt" "sync" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/federationsender/statistics" "github.com/matrix-org/dendrite/federationsender/storage" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/federationsender/storage/shared/storage.go b/federationsender/storage/shared/storage.go index 256cc7cde..abe670a7d 100644 --- a/federationsender/storage/shared/storage.go +++ b/federationsender/storage/shared/storage.go @@ -17,9 +17,10 @@ package shared import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/federationsender/storage/tables" "github.com/matrix-org/dendrite/federationsender/types" "github.com/matrix-org/dendrite/internal/sqlutil" diff --git a/federationsender/storage/shared/storage_edus.go b/federationsender/storage/shared/storage_edus.go index c9955c4f9..31fe6c12d 100644 --- a/federationsender/storage/shared/storage_edus.go +++ b/federationsender/storage/shared/storage_edus.go @@ -17,10 +17,11 @@ package shared import ( "context" "database/sql" - json "github.com/json-iterator/go" "errors" "fmt" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" ) diff --git a/federationsender/storage/shared/storage_pdus.go b/federationsender/storage/shared/storage_pdus.go index 972a76329..dd7111e96 100644 --- a/federationsender/storage/shared/storage_pdus.go +++ b/federationsender/storage/shared/storage_pdus.go @@ -17,10 +17,11 @@ package shared import ( "context" "database/sql" - json "github.com/json-iterator/go" "errors" "fmt" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" ) diff --git a/internal/httputil/http.go b/internal/httputil/http.go index 2e1e23182..436edd06c 100644 --- a/internal/httputil/http.go +++ b/internal/httputil/http.go @@ -17,12 +17,13 @@ package httputil import ( "bytes" "context" - json "github.com/json-iterator/go" "fmt" "net/http" "net/url" "strings" + json "github.com/json-iterator/go" + opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" ) diff --git a/keyserver/api/api.go b/keyserver/api/api.go index c38086275..284ad970d 100644 --- a/keyserver/api/api.go +++ b/keyserver/api/api.go @@ -16,10 +16,11 @@ package api import ( "context" - json "github.com/json-iterator/go" "strings" "time" + json "github.com/json-iterator/go" + userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/keyserver/internal/device_list_update.go b/keyserver/internal/device_list_update.go index 590c9bdd4..4b85534c2 100644 --- a/keyserver/internal/device_list_update.go +++ b/keyserver/internal/device_list_update.go @@ -16,12 +16,13 @@ package internal import ( "context" - json "github.com/json-iterator/go" "fmt" "hash/fnv" "sync" "time" + json "github.com/json-iterator/go" + fedsenderapi "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index 10d7ec04f..2cf39a40a 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -17,11 +17,12 @@ package internal import ( "bytes" "context" - json "github.com/json-iterator/go" "fmt" "sync" "time" + json "github.com/json-iterator/go" + fedsenderapi "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/dendrite/keyserver/producers" diff --git a/keyserver/inthttp/server.go b/keyserver/inthttp/server.go index c3c426dd6..3a48473bb 100644 --- a/keyserver/inthttp/server.go +++ b/keyserver/inthttp/server.go @@ -15,9 +15,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/keyserver/api" diff --git a/keyserver/producers/keychange.go b/keyserver/producers/keychange.go index 40bfbbe60..c67b94450 100644 --- a/keyserver/producers/keychange.go +++ b/keyserver/producers/keychange.go @@ -16,6 +16,7 @@ package producers import ( "context" + json "github.com/json-iterator/go" "github.com/Shopify/sarama" diff --git a/keyserver/storage/interface.go b/keyserver/storage/interface.go index c070f95fd..3980ba800 100644 --- a/keyserver/storage/interface.go +++ b/keyserver/storage/interface.go @@ -16,6 +16,7 @@ package storage import ( "context" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/keyserver/storage/postgres/one_time_keys_table.go b/keyserver/storage/postgres/one_time_keys_table.go index cb41dc729..1cdcaf72e 100644 --- a/keyserver/storage/postgres/one_time_keys_table.go +++ b/keyserver/storage/postgres/one_time_keys_table.go @@ -17,9 +17,10 @@ package postgres import ( "context" "database/sql" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/keyserver/api" diff --git a/keyserver/storage/shared/storage.go b/keyserver/storage/shared/storage.go index fa80b5264..a14199262 100644 --- a/keyserver/storage/shared/storage.go +++ b/keyserver/storage/shared/storage.go @@ -17,6 +17,7 @@ package shared import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/internal/sqlutil" diff --git a/keyserver/storage/sqlite3/one_time_keys_table.go b/keyserver/storage/sqlite3/one_time_keys_table.go index 56dfefc6e..473388984 100644 --- a/keyserver/storage/sqlite3/one_time_keys_table.go +++ b/keyserver/storage/sqlite3/one_time_keys_table.go @@ -17,9 +17,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/keyserver/api" diff --git a/keyserver/storage/tables/interface.go b/keyserver/storage/tables/interface.go index 8411f2592..c3699327e 100644 --- a/keyserver/storage/tables/interface.go +++ b/keyserver/storage/tables/interface.go @@ -17,6 +17,7 @@ package tables import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/keyserver/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go index 760524853..3b2f1d392 100644 --- a/mediaapi/routing/download.go +++ b/mediaapi/routing/download.go @@ -16,7 +16,6 @@ package routing import ( "context" - json "github.com/json-iterator/go" "fmt" "io" "mime" @@ -30,6 +29,8 @@ import ( "sync" "unicode" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/mediaapi/fileutils" diff --git a/roomserver/acls/acls.go b/roomserver/acls/acls.go index de7e9b719..1659c6ca1 100644 --- a/roomserver/acls/acls.go +++ b/roomserver/acls/acls.go @@ -16,13 +16,14 @@ package acls import ( "context" - json "github.com/json-iterator/go" "fmt" "net" "regexp" "strings" "sync" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" "github.com/sirupsen/logrus" ) diff --git a/roomserver/api/api_trace.go b/roomserver/api/api_trace.go index 8cf3a5211..d5c292f63 100644 --- a/roomserver/api/api_trace.go +++ b/roomserver/api/api_trace.go @@ -2,9 +2,10 @@ package api import ( "context" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + fsAPI "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/util" ) diff --git a/roomserver/api/perform.go b/roomserver/api/perform.go index fc5e468f6..060624e23 100644 --- a/roomserver/api/perform.go +++ b/roomserver/api/perform.go @@ -1,10 +1,11 @@ package api import ( - json "github.com/json-iterator/go" "fmt" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/gomatrixserverlib" "github.com/matrix-org/util" diff --git a/roomserver/api/query.go b/roomserver/api/query.go index 5fd74af33..08c42b62c 100644 --- a/roomserver/api/query.go +++ b/roomserver/api/query.go @@ -17,10 +17,11 @@ package api import ( - json "github.com/json-iterator/go" "fmt" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/alias.go b/roomserver/internal/alias.go index e04885395..9092ed03b 100644 --- a/roomserver/internal/alias.go +++ b/roomserver/internal/alias.go @@ -16,11 +16,12 @@ package internal import ( "context" - json "github.com/json-iterator/go" "errors" "fmt" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/roomserver/internal/input/input.go b/roomserver/internal/input/input.go index b5ad9d98a..80e4554b0 100644 --- a/roomserver/internal/input/input.go +++ b/roomserver/internal/input/input.go @@ -17,10 +17,11 @@ package input import ( "context" - json "github.com/json-iterator/go" "sync" "time" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/roomserver/acls" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/roomserver/internal/perform/perform_peek.go b/roomserver/internal/perform/perform_peek.go index fcf074cf9..67c8b3682 100644 --- a/roomserver/internal/perform/perform_peek.go +++ b/roomserver/internal/perform/perform_peek.go @@ -16,10 +16,11 @@ package perform import ( "context" - json "github.com/json-iterator/go" "fmt" "strings" + json "github.com/json-iterator/go" + fsAPI "github.com/matrix-org/dendrite/federationsender/api" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/roomserver/internal/query/query_test.go b/roomserver/internal/query/query_test.go index 7ca770406..9198a2346 100644 --- a/roomserver/internal/query/query_test.go +++ b/roomserver/internal/query/query_test.go @@ -16,9 +16,10 @@ package query import ( "context" - json "github.com/json-iterator/go" "testing" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/test" "github.com/matrix-org/dendrite/roomserver/types" "github.com/matrix-org/gomatrixserverlib" diff --git a/roomserver/inthttp/server.go b/roomserver/inthttp/server.go index 17c7cb28b..8bbb7b93d 100644 --- a/roomserver/inthttp/server.go +++ b/roomserver/inthttp/server.go @@ -1,9 +1,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go index 70e733090..53886c95e 100644 --- a/roomserver/roomserver_test.go +++ b/roomserver/roomserver_test.go @@ -4,13 +4,14 @@ import ( "bytes" "context" "crypto/ed25519" - json "github.com/json-iterator/go" "fmt" "os" "reflect" "testing" "time" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/config" diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go index 69fa400bb..3bb28e702 100644 --- a/roomserver/storage/shared/storage.go +++ b/roomserver/storage/shared/storage.go @@ -3,10 +3,11 @@ package shared import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" "sort" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/api" diff --git a/roomserver/storage/sqlite3/events_table.go b/roomserver/storage/sqlite3/events_table.go index 49dc0b87c..c953a1d0a 100644 --- a/roomserver/storage/sqlite3/events_table.go +++ b/roomserver/storage/sqlite3/events_table.go @@ -18,10 +18,11 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/storage/shared" diff --git a/roomserver/storage/sqlite3/rooms_table.go b/roomserver/storage/sqlite3/rooms_table.go index 3d453c3e4..7399c3abd 100644 --- a/roomserver/storage/sqlite3/rooms_table.go +++ b/roomserver/storage/sqlite3/rooms_table.go @@ -18,11 +18,12 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "errors" "fmt" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/storage/shared" diff --git a/roomserver/storage/sqlite3/state_snapshot_table.go b/roomserver/storage/sqlite3/state_snapshot_table.go index d8f715ddd..7e3c7fcd3 100644 --- a/roomserver/storage/sqlite3/state_snapshot_table.go +++ b/roomserver/storage/sqlite3/state_snapshot_table.go @@ -18,10 +18,11 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/roomserver/storage/shared" diff --git a/signingkeyserver/inthttp/server.go b/signingkeyserver/inthttp/server.go index 1e3be3cd3..b66d81de5 100644 --- a/signingkeyserver/inthttp/server.go +++ b/signingkeyserver/inthttp/server.go @@ -1,9 +1,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/httputil" diff --git a/signingkeyserver/serverkeyapi_test.go b/signingkeyserver/serverkeyapi_test.go index f1c0d60bb..8a9653665 100644 --- a/signingkeyserver/serverkeyapi_test.go +++ b/signingkeyserver/serverkeyapi_test.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "crypto/ed25519" - json "github.com/json-iterator/go" "fmt" "io/ioutil" "net/http" @@ -13,6 +12,8 @@ import ( "testing" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/federationapi/routing" "github.com/matrix-org/dendrite/internal/caching" "github.com/matrix-org/dendrite/internal/config" diff --git a/syncapi/consumers/clientapi.go b/syncapi/consumers/clientapi.go index e09c7f30b..c2b95e446 100644 --- a/syncapi/consumers/clientapi.go +++ b/syncapi/consumers/clientapi.go @@ -16,6 +16,7 @@ package consumers import ( "context" + json "github.com/json-iterator/go" "github.com/Shopify/sarama" diff --git a/syncapi/consumers/eduserver_sendtodevice.go b/syncapi/consumers/eduserver_sendtodevice.go index 606fbb3bb..ab555b443 100644 --- a/syncapi/consumers/eduserver_sendtodevice.go +++ b/syncapi/consumers/eduserver_sendtodevice.go @@ -16,6 +16,7 @@ package consumers import ( "context" + json "github.com/json-iterator/go" "github.com/Shopify/sarama" diff --git a/syncapi/consumers/keychange.go b/syncapi/consumers/keychange.go index 85540f3ec..a225258d8 100644 --- a/syncapi/consumers/keychange.go +++ b/syncapi/consumers/keychange.go @@ -16,9 +16,10 @@ package consumers import ( "context" - json "github.com/json-iterator/go" "sync" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/keyserver/api" diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index bfaca58ce..a1c85af1e 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -16,9 +16,10 @@ package consumers import ( "context" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + "github.com/Shopify/sarama" "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/config" diff --git a/syncapi/routing/filter.go b/syncapi/routing/filter.go index c7eb7ccbe..05293b46a 100644 --- a/syncapi/routing/filter.go +++ b/syncapi/routing/filter.go @@ -15,10 +15,11 @@ package routing import ( - json "github.com/json-iterator/go" "io/ioutil" "net/http" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/jsonerror" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/sync" diff --git a/syncapi/storage/postgres/current_room_state_table.go b/syncapi/storage/postgres/current_room_state_table.go index c44349e3a..5054d8df0 100644 --- a/syncapi/storage/postgres/current_room_state_table.go +++ b/syncapi/storage/postgres/current_room_state_table.go @@ -18,6 +18,7 @@ package postgres import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/lib/pq" diff --git a/syncapi/storage/postgres/filter_table.go b/syncapi/storage/postgres/filter_table.go index 10fd23269..66bcf0158 100644 --- a/syncapi/storage/postgres/filter_table.go +++ b/syncapi/storage/postgres/filter_table.go @@ -17,6 +17,7 @@ package postgres import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/syncapi/storage/tables" diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index d83c94ff7..05f6782e8 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -18,6 +18,7 @@ package postgres import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/internal" diff --git a/syncapi/storage/postgres/output_room_events_table.go b/syncapi/storage/postgres/output_room_events_table.go index f493571d6..2bfe79445 100644 --- a/syncapi/storage/postgres/output_room_events_table.go +++ b/syncapi/storage/postgres/output_room_events_table.go @@ -18,9 +18,10 @@ package postgres import ( "context" "database/sql" - json "github.com/json-iterator/go" "sort" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/syncapi/storage/tables" diff --git a/syncapi/storage/postgres/send_to_device_table.go b/syncapi/storage/postgres/send_to_device_table.go index 00ff6150a..ce3fa6cec 100644 --- a/syncapi/storage/postgres/send_to_device_table.go +++ b/syncapi/storage/postgres/send_to_device_table.go @@ -17,6 +17,7 @@ package postgres import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/lib/pq" diff --git a/syncapi/storage/shared/syncserver.go b/syncapi/storage/shared/syncserver.go index 9519e4f5a..79aba0f29 100644 --- a/syncapi/storage/shared/syncserver.go +++ b/syncapi/storage/shared/syncserver.go @@ -17,10 +17,11 @@ package shared import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" "time" + json "github.com/json-iterator/go" + userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/eduserver/cache" diff --git a/syncapi/storage/sqlite3/current_room_state_table.go b/syncapi/storage/sqlite3/current_room_state_table.go index d27bcdbd9..8d9c0f0f4 100644 --- a/syncapi/storage/sqlite3/current_room_state_table.go +++ b/syncapi/storage/sqlite3/current_room_state_table.go @@ -18,9 +18,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/syncapi/storage/tables" diff --git a/syncapi/storage/sqlite3/filter_table.go b/syncapi/storage/sqlite3/filter_table.go index 63532ba93..e1a926ab7 100644 --- a/syncapi/storage/sqlite3/filter_table.go +++ b/syncapi/storage/sqlite3/filter_table.go @@ -17,9 +17,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "fmt" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/syncapi/storage/tables" "github.com/matrix-org/gomatrixserverlib" ) diff --git a/syncapi/storage/sqlite3/invites_table.go b/syncapi/storage/sqlite3/invites_table.go index 7af7e7798..628936b4e 100644 --- a/syncapi/storage/sqlite3/invites_table.go +++ b/syncapi/storage/sqlite3/invites_table.go @@ -18,6 +18,7 @@ package sqlite3 import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/internal" diff --git a/syncapi/storage/sqlite3/output_room_events_table.go b/syncapi/storage/sqlite3/output_room_events_table.go index 86aa1dbd6..3ae9c49ba 100644 --- a/syncapi/storage/sqlite3/output_room_events_table.go +++ b/syncapi/storage/sqlite3/output_room_events_table.go @@ -18,9 +18,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "sort" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/dendrite/syncapi/storage/tables" diff --git a/syncapi/storage/sqlite3/send_to_device_table.go b/syncapi/storage/sqlite3/send_to_device_table.go index f2631291c..f0a03a017 100644 --- a/syncapi/storage/sqlite3/send_to_device_table.go +++ b/syncapi/storage/sqlite3/send_to_device_table.go @@ -17,9 +17,10 @@ package sqlite3 import ( "context" "database/sql" - json "github.com/json-iterator/go" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal" "github.com/matrix-org/dendrite/internal/sqlutil" "github.com/matrix-org/dendrite/syncapi/storage/tables" diff --git a/syncapi/storage/storage_test.go b/syncapi/storage/storage_test.go index bfaefc4f5..21f0cbf89 100644 --- a/syncapi/storage/storage_test.go +++ b/syncapi/storage/storage_test.go @@ -3,12 +3,13 @@ package storage_test import ( "context" "crypto/ed25519" - json "github.com/json-iterator/go" "fmt" "os" "testing" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/storage/sqlite3" diff --git a/syncapi/sync/notifier_test.go b/syncapi/sync/notifier_test.go index 2a69d643c..6184b7fc3 100644 --- a/syncapi/sync/notifier_test.go +++ b/syncapi/sync/notifier_test.go @@ -16,12 +16,13 @@ package sync import ( "context" - json "github.com/json-iterator/go" "fmt" "sync" "testing" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/syncapi/types" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" diff --git a/syncapi/sync/request.go b/syncapi/sync/request.go index 0ec84faf2..671eb66bd 100644 --- a/syncapi/sync/request.go +++ b/syncapi/sync/request.go @@ -16,11 +16,12 @@ package sync import ( "context" - json "github.com/json-iterator/go" "net/http" "strconv" "time" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/syncapi/storage" "github.com/matrix-org/dendrite/syncapi/types" userapi "github.com/matrix-org/dendrite/userapi/api" diff --git a/syncapi/types/types.go b/syncapi/types/types.go index 1071036db..c9d9c1f47 100644 --- a/syncapi/types/types.go +++ b/syncapi/types/types.go @@ -17,11 +17,12 @@ package types import ( "errors" "fmt" - json "github.com/json-iterator/go" "sort" "strconv" "strings" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/roomserver/api" "github.com/matrix-org/gomatrixserverlib" "github.com/tidwall/gjson" diff --git a/syncapi/types/types_test.go b/syncapi/types/types_test.go index c11b71e1e..85df50378 100644 --- a/syncapi/types/types_test.go +++ b/syncapi/types/types_test.go @@ -1,10 +1,11 @@ package types import ( - json "github.com/json-iterator/go" "reflect" "testing" + json "github.com/json-iterator/go" + "github.com/matrix-org/gomatrixserverlib" ) diff --git a/userapi/api/api.go b/userapi/api/api.go index bbb90dc6b..b7fcdeddc 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -16,6 +16,7 @@ package api import ( "context" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" diff --git a/userapi/internal/api.go b/userapi/internal/api.go index a0a802e8c..6bc2ed002 100644 --- a/userapi/internal/api.go +++ b/userapi/internal/api.go @@ -19,6 +19,7 @@ import ( "database/sql" "errors" "fmt" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/appservice/types" diff --git a/userapi/inthttp/server.go b/userapi/inthttp/server.go index 7a48aa839..4d5521c69 100644 --- a/userapi/inthttp/server.go +++ b/userapi/inthttp/server.go @@ -15,9 +15,10 @@ package inthttp import ( - json "github.com/json-iterator/go" "net/http" + json "github.com/json-iterator/go" + "github.com/gorilla/mux" "github.com/matrix-org/dendrite/internal/httputil" "github.com/matrix-org/dendrite/userapi/api" diff --git a/userapi/storage/accounts/interface.go b/userapi/storage/accounts/interface.go index 4a6ca28f8..4525a9a78 100644 --- a/userapi/storage/accounts/interface.go +++ b/userapi/storage/accounts/interface.go @@ -17,6 +17,7 @@ package accounts import ( "context" "errors" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/clientapi/auth/authtypes" diff --git a/userapi/storage/accounts/postgres/account_data_table.go b/userapi/storage/accounts/postgres/account_data_table.go index d56ce2c39..ee2e821ca 100644 --- a/userapi/storage/accounts/postgres/account_data_table.go +++ b/userapi/storage/accounts/postgres/account_data_table.go @@ -17,6 +17,7 @@ package postgres import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/internal" diff --git a/userapi/storage/accounts/postgres/storage.go b/userapi/storage/accounts/postgres/storage.go index 9b3687326..4672c5a8b 100644 --- a/userapi/storage/accounts/postgres/storage.go +++ b/userapi/storage/accounts/postgres/storage.go @@ -18,9 +18,10 @@ import ( "context" "database/sql" "errors" - json "github.com/json-iterator/go" "strconv" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil" diff --git a/userapi/storage/accounts/sqlite3/account_data_table.go b/userapi/storage/accounts/sqlite3/account_data_table.go index 45ed1c065..629418a2b 100644 --- a/userapi/storage/accounts/sqlite3/account_data_table.go +++ b/userapi/storage/accounts/sqlite3/account_data_table.go @@ -17,6 +17,7 @@ package sqlite3 import ( "context" "database/sql" + json "github.com/json-iterator/go" "github.com/matrix-org/dendrite/internal/sqlutil" diff --git a/userapi/storage/accounts/sqlite3/storage.go b/userapi/storage/accounts/sqlite3/storage.go index ee8dfc240..9f4014ad2 100644 --- a/userapi/storage/accounts/sqlite3/storage.go +++ b/userapi/storage/accounts/sqlite3/storage.go @@ -18,10 +18,11 @@ import ( "context" "database/sql" "errors" - json "github.com/json-iterator/go" "strconv" "sync" + json "github.com/json-iterator/go" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/internal/config" "github.com/matrix-org/dendrite/internal/sqlutil"