diff --git a/cmd/api/main.go b/cmd/api/main.go index 5423dfe23..19294b874 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -6,6 +6,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/api" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/openKeeper" "net" diff --git a/internal/api/a2r/api2rpc.go b/internal/api/a2r/api2rpc.go index 812f620c1..c27bfaf45 100644 --- a/internal/api/a2r/api2rpc.go +++ b/internal/api/a2r/api2rpc.go @@ -3,6 +3,7 @@ package a2r import ( "context" "github.com/OpenIMSDK/Open-IM-Server/internal/apiresp" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/gin-gonic/gin" "google.golang.org/grpc" diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index 652096e5e..aae33698f 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -1,7 +1,6 @@ package msgtransfer import ( - "fmt" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" @@ -9,7 +8,6 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog" pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/statistics" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "github.com/Shopify/sarama" "github.com/golang/protobuf/proto" diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index bb5acb77a..ee619ad7e 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -5,7 +5,6 @@ import ( "encoding/json" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" diff --git a/pkg/common/mw/gin.go b/pkg/common/mw/gin.go index d82dfd733..ad90188b8 100644 --- a/pkg/common/mw/gin.go +++ b/pkg/common/mw/gin.go @@ -3,14 +3,21 @@ package mw import ( "bytes" "encoding/json" + "github.com/OpenIMSDK/Open-IM-Server/internal/apiresp" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/gin-gonic/gin" + "github.com/go-redis/redis/v8" "io" "net/http" - "github.com/go-redis/redis/v8" ) -type GinMwOptions func( *gin.RouterGroup ) +type GinMwOptions func(*gin.RouterGroup) func WithRecovery() GinMwOptions { return func(group *gin.RouterGroup) {