From 5ec628fccb9e4f13fc9fd73ab08968bf5652fc5e Mon Sep 17 00:00:00 2001
From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com>
Date: Mon, 3 Jul 2023 14:12:29 +0800
Subject: [PATCH] style: add import formatting

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
---
 .github/workflows/openim-ci.yml               | 72 +++++++++++++++++++
 go.mod                                        |  1 +
 go.sum                                        |  2 +
 internal/msggateway/callback.go               |  3 +-
 internal/msggateway/context.go                |  5 +-
 internal/msggateway/encoder.go                |  1 +
 internal/msggateway/hub_server.go             |  1 +
 internal/msggateway/long_conn.go              |  3 +-
 internal/msggateway/user_map.go               |  3 +-
 internal/push/offlinepush/fcm/push_test.go    |  3 +-
 internal/push/offlinepush/getui/push.go       |  8 ++-
 .../push/offlinepush/jpush/body/platform.go   |  1 +
 internal/push/offlinepush/jpush/push.go       |  1 +
 internal/rpc/group/fill.go                    |  1 +
 internal/rpc/msg/msg_status.go                |  1 +
 internal/rpc/msg/revoke.go                    |  3 +-
 internal/rpc/msg/send.go                      |  1 +
 internal/rpc/third/s3.go                      |  3 +-
 internal/rpc/user/statistics.go               |  3 +-
 internal/rpc/user/user.go                     |  3 +-
 pkg/a2r/api2rpc.go                            |  1 +
 pkg/apiresp/gin.go                            |  3 +-
 pkg/apiresp/resp.go                           |  3 +-
 pkg/common/config/parse.go                    |  7 +-
 pkg/common/db/controller/msg.go               |  3 +-
 pkg/common/db/controller/storage.go           | 11 +--
 pkg/common/db/obj/minio.go                    |  9 +--
 pkg/common/db/ormutil/utils.go                |  3 +-
 pkg/common/db/relation/group_model.go         |  1 +
 pkg/common/db/relation/group_request_model.go |  1 +
 pkg/common/db/relation/mysql_init.go          |  3 +-
 pkg/common/db/relation/object_hash_model.go   |  1 +
 pkg/common/db/relation/object_info_model.go   |  3 +-
 pkg/common/db/relation/object_put_model.go    |  3 +-
 pkg/common/db/relation/user_model.go          |  3 +-
 pkg/common/db/tx/mongo.go                     |  1 +
 pkg/common/db/unrelation/super_group.go       |  1 +
 pkg/common/kafka/consumer_group.go            |  1 +
 pkg/common/mw/rpc_server_interceptor.go       |  3 +-
 pkg/common/prome/prometheus.go                |  3 +-
 pkg/common/tokenverify/jwt_token.go           |  3 +-
 pkg/errs/coderr.go                            |  3 +-
 pkg/proto/auth/auth.pb.go                     |  5 +-
 pkg/proto/conversation/conversation.pb.go     |  5 +-
 pkg/proto/errinfo/errinfo.pb.go               |  5 +-
 pkg/proto/friend/friend.pb.go                 |  5 +-
 pkg/proto/group/group.pb.go                   |  5 +-
 pkg/proto/msg/msg.pb.go                       |  5 +-
 pkg/proto/msggateway/msggateway.pb.go         |  5 +-
 pkg/proto/push/push.pb.go                     |  5 +-
 pkg/proto/sdkws/sdkws.pb.go                   |  5 +-
 pkg/proto/statistics/statistics.pb.go         |  3 +-
 pkg/proto/third/third.pb.go                   |  5 +-
 pkg/proto/user/user.pb.go                     |  5 +-
 pkg/proto/wrapperspb/wrapperspb.pb.go         |  5 +-
 pkg/statistics/statistics.go                  |  3 +-
 pkg/utils/file.go                             |  3 +-
 pkg/utils/platform_number_id_to_name_test.go  |  3 +-
 pkg/utils/time_format.go                      | 18 ++---
 scripts/make-rules/golang.mk                  |  2 +-
 test/mongo/cmd/main.go                        |  1 +
 test/mongo/mongo_utils.go                     |  3 +-
 62 files changed, 209 insertions(+), 76 deletions(-)
 create mode 100644 .github/workflows/openim-ci.yml

diff --git a/.github/workflows/openim-ci.yml b/.github/workflows/openim-ci.yml
new file mode 100644
index 000000000..7ee0545f8
--- /dev/null
+++ b/.github/workflows/openim-ci.yml
@@ -0,0 +1,72 @@
+name: IamCI
+
+on:
+# main branch
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+
+jobs:
+
+  iamci:
+    name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    environment:
+      name: iamci
+
+    strategy:
+      matrix:
+        go_version: [1.18, 1.19, 1.20]
+        os: [ubuntu-latest, macOS-latest]
+
+    steps:
+      - name: Set up Go ${{ matrix.go_version }}
+        uses: actions/setup-go@v2
+        with:
+          go-version: ${{ matrix.go_version }}
+        id: go
+
+      - name: Check out code into the Go module directory
+        uses: actions/checkout@v2
+
+      - name: Run go modules Tidy
+        run: |
+          make tidy
+
+      - name: Generate all necessary files, such as error code files
+        run: |
+          make gen
+
+      - name: Check syntax and styling of go sources
+        run: |
+          make lint
+
+      - name: Run unit test and get test coverage
+        run: |
+          make cover
+
+      - name: Build source code for host platform
+        run: |
+          make build
+
+      - name: Collect Test Coverage File
+        uses: actions/upload-artifact@v1.0.0
+        with:
+          name: main-output
+          path: _output/coverage.out
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+
+      - name: Login to DockerHub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: Build docker images for host arch and push images to registry
+        run: |
+          make push
\ No newline at end of file
diff --git a/go.mod b/go.mod
index 0a8c1fd52..88d5abb09 100644
--- a/go.mod
+++ b/go.mod
@@ -43,6 +43,7 @@ require (
 	github.com/go-sql-driver/mysql v1.6.0
 	github.com/go-zookeeper/zk v1.0.3
 	github.com/redis/go-redis/v9 v9.0.5
+	gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
 )
 
 require (
diff --git a/go.sum b/go.sum
index 443d6cb9d..12f5d41bb 100644
--- a/go.sum
+++ b/go.sum
@@ -784,6 +784,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
 gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI=
 gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/internal/msggateway/callback.go b/internal/msggateway/callback.go
index 2d30b52b4..557e65ea6 100644
--- a/internal/msggateway/callback.go
+++ b/internal/msggateway/callback.go
@@ -2,12 +2,13 @@ package msggateway
 
 import (
 	"context"
+	"time"
+
 	cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct"
 	"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/http"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
-	"time"
 )
 
 func url() string {
diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go
index cd395e7e0..61f4d7970 100644
--- a/internal/msggateway/context.go
+++ b/internal/msggateway/context.go
@@ -1,11 +1,12 @@
 package msggateway
 
 import (
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"net/http"
 	"strconv"
 	"time"
+
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 )
 
 type UserConnContext struct {
diff --git a/internal/msggateway/encoder.go b/internal/msggateway/encoder.go
index 6a4104ff4..6915766c6 100644
--- a/internal/msggateway/encoder.go
+++ b/internal/msggateway/encoder.go
@@ -3,6 +3,7 @@ package msggateway
 import (
 	"bytes"
 	"encoding/gob"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 )
 
diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go
index 633b7c479..ab8f9af26 100644
--- a/internal/msggateway/hub_server.go
+++ b/internal/msggateway/hub_server.go
@@ -2,6 +2,7 @@ package msggateway
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
 
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
diff --git a/internal/msggateway/long_conn.go b/internal/msggateway/long_conn.go
index ed31dbda7..911e9a4a1 100644
--- a/internal/msggateway/long_conn.go
+++ b/internal/msggateway/long_conn.go
@@ -1,9 +1,10 @@
 package msggateway
 
 import (
-	"github.com/gorilla/websocket"
 	"net/http"
 	"time"
+
+	"github.com/gorilla/websocket"
 )
 
 type LongConn interface {
diff --git a/internal/msggateway/user_map.go b/internal/msggateway/user_map.go
index 63881bc1a..46bdb16a4 100644
--- a/internal/msggateway/user_map.go
+++ b/internal/msggateway/user_map.go
@@ -2,9 +2,10 @@ package msggateway
 
 import (
 	"context"
+	"sync"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
-	"sync"
 )
 
 type UserMap struct {
diff --git a/internal/push/offlinepush/fcm/push_test.go b/internal/push/offlinepush/fcm/push_test.go
index 81b54cfbb..1a7240302 100644
--- a/internal/push/offlinepush/fcm/push_test.go
+++ b/internal/push/offlinepush/fcm/push_test.go
@@ -2,10 +2,11 @@ package fcm
 
 import (
 	"context"
+	"testing"
+
 	"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
 	"github.com/stretchr/testify/assert"
-	"testing"
 )
 
 func Test_Push(t *testing.T) {
diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go
index db5accbd7..54bd83673 100644
--- a/internal/push/offlinepush/getui/push.go
+++ b/internal/push/offlinepush/getui/push.go
@@ -1,13 +1,17 @@
 package getui
 
 import (
-	"github.com/go-redis/redis"
 	"sync"
 
+	"github.com/go-redis/redis"
+
 	"context"
 	"crypto/sha256"
 	"encoding/hex"
 	"errors"
+	"strconv"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
@@ -16,8 +20,6 @@ import (
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils/splitter"
-	"strconv"
-	"time"
 
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 )
diff --git a/internal/push/offlinepush/jpush/body/platform.go b/internal/push/offlinepush/jpush/body/platform.go
index 9aa28f82c..68264fea0 100644
--- a/internal/push/offlinepush/jpush/body/platform.go
+++ b/internal/push/offlinepush/jpush/body/platform.go
@@ -2,6 +2,7 @@ package body
 
 import (
 	"errors"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 )
 
diff --git a/internal/push/offlinepush/jpush/push.go b/internal/push/offlinepush/jpush/push.go
index 6a4ea0ceb..75fc2b27b 100644
--- a/internal/push/offlinepush/jpush/push.go
+++ b/internal/push/offlinepush/jpush/push.go
@@ -4,6 +4,7 @@ import (
 	"context"
 	"encoding/base64"
 	"fmt"
+
 	"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush"
 	"github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/jpush/body"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
diff --git a/internal/rpc/group/fill.go b/internal/rpc/group/fill.go
index 4302e3bf0..da82e9b5e 100644
--- a/internal/rpc/group/fill.go
+++ b/internal/rpc/group/fill.go
@@ -2,6 +2,7 @@ package group
 
 import (
 	"context"
+
 	relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 )
diff --git a/internal/rpc/msg/msg_status.go b/internal/rpc/msg/msg_status.go
index 5639ecc01..3e1f9053b 100644
--- a/internal/rpc/msg/msg_status.go
+++ b/internal/rpc/msg/msg_status.go
@@ -2,6 +2,7 @@ package msg
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
 	pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go
index 746017940..c32050bfe 100644
--- a/internal/rpc/msg/revoke.go
+++ b/internal/rpc/msg/revoke.go
@@ -3,9 +3,10 @@ package msg
 import (
 	"context"
 	"encoding/json"
-	"github.com/google/uuid"
 	"time"
 
+	"github.com/google/uuid"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go
index a7fc6533b..deaee0bed 100644
--- a/internal/rpc/msg/send.go
+++ b/internal/rpc/msg/send.go
@@ -2,6 +2,7 @@ package msg
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go
index 21471e00d..e0a3a99da 100644
--- a/internal/rpc/third/s3.go
+++ b/internal/rpc/third/s3.go
@@ -2,9 +2,10 @@ package third
 
 import (
 	"context"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"
-	"time"
 )
 
 func (t *thirdServer) ApplyPut(ctx context.Context, req *third.ApplyPutReq) (*third.ApplyPutResp, error) {
diff --git a/internal/rpc/user/statistics.go b/internal/rpc/user/statistics.go
index 036b09687..12ec0d55f 100644
--- a/internal/rpc/user/statistics.go
+++ b/internal/rpc/user/statistics.go
@@ -2,9 +2,10 @@ package user
 
 import (
 	"context"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	pbuser "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
-	"time"
 )
 
 func (s *userServer) UserRegisterCount(ctx context.Context, req *pbuser.UserRegisterCountReq) (*pbuser.UserRegisterCountResp, error) {
diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go
index 3437754dc..277bf4284 100644
--- a/internal/rpc/user/user.go
+++ b/internal/rpc/user/user.go
@@ -2,10 +2,11 @@ package user
 
 import (
 	"context"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 	"strings"
 	"time"
 
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
+
 	"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/convert"
diff --git a/pkg/a2r/api2rpc.go b/pkg/a2r/api2rpc.go
index 50d5b2ac3..39bd70ce4 100644
--- a/pkg/a2r/api2rpc.go
+++ b/pkg/a2r/api2rpc.go
@@ -2,6 +2,7 @@ package a2r
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/checker"
 
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp"
diff --git a/pkg/apiresp/gin.go b/pkg/apiresp/gin.go
index e17f0144a..b2bfaf4f9 100644
--- a/pkg/apiresp/gin.go
+++ b/pkg/apiresp/gin.go
@@ -1,8 +1,9 @@
 package apiresp
 
 import (
-	"github.com/gin-gonic/gin"
 	"net/http"
+
+	"github.com/gin-gonic/gin"
 )
 
 func GinError(c *gin.Context, err error) {
diff --git a/pkg/apiresp/resp.go b/pkg/apiresp/resp.go
index cd215a984..29dc33996 100644
--- a/pkg/apiresp/resp.go
+++ b/pkg/apiresp/resp.go
@@ -1,8 +1,9 @@
 package apiresp
 
 import (
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"reflect"
+
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 )
 
 type ApiResponse struct {
diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go
index 8ab68b68f..0a32e81c7 100644
--- a/pkg/common/config/parse.go
+++ b/pkg/common/config/parse.go
@@ -3,13 +3,14 @@ package config
 import (
 	"bytes"
 	"fmt"
+	"os"
+	"path/filepath"
+	"runtime"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"gopkg.in/yaml.v3"
-	"os"
-	"path/filepath"
-	"runtime"
 )
 
 var (
diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go
index e732f1f08..dd62e0e2e 100644
--- a/pkg/common/db/controller/msg.go
+++ b/pkg/common/db/controller/msg.go
@@ -2,9 +2,10 @@ package controller
 
 import (
 	"fmt"
-	"github.com/redis/go-redis/v9"
 	"time"
 
+	"github.com/redis/go-redis/v9"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
diff --git a/pkg/common/db/controller/storage.go b/pkg/common/db/controller/storage.go
index 5182bb199..6531c5127 100644
--- a/pkg/common/db/controller/storage.go
+++ b/pkg/common/db/controller/storage.go
@@ -9,6 +9,12 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"io"
+	"net/url"
+	"path"
+	"strconv"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/obj"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
@@ -16,11 +22,6 @@ import (
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"github.com/google/uuid"
-	"io"
-	"net/url"
-	"path"
-	"strconv"
-	"time"
 )
 
 const (
diff --git a/pkg/common/db/obj/minio.go b/pkg/common/db/obj/minio.go
index 8e28896bd..488775f27 100644
--- a/pkg/common/db/obj/minio.go
+++ b/pkg/common/db/obj/minio.go
@@ -4,15 +4,16 @@ import (
 	"context"
 	"errors"
 	"fmt"
+	"io"
+	"net/http"
+	"net/url"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"github.com/minio/minio-go/v7"
 	"github.com/minio/minio-go/v7/pkg/credentials"
 	"github.com/minio/minio-go/v7/pkg/s3utils"
-	"io"
-	"net/http"
-	"net/url"
-	"time"
 )
 
 func NewMinioInterface() (Interface, error) {
diff --git a/pkg/common/db/ormutil/utils.go b/pkg/common/db/ormutil/utils.go
index 2a916cb39..9c4e19a5b 100644
--- a/pkg/common/db/ormutil/utils.go
+++ b/pkg/common/db/ormutil/utils.go
@@ -2,9 +2,10 @@ package ormutil
 
 import (
 	"fmt"
+	"strings"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"gorm.io/gorm"
-	"strings"
 )
 
 func GormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (uint32, []*E, error) {
diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go
index 39feb5d7a..dd9f59bea 100644
--- a/pkg/common/db/relation/group_model.go
+++ b/pkg/common/db/relation/group_model.go
@@ -2,6 +2,7 @@ package relation
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
diff --git a/pkg/common/db/relation/group_request_model.go b/pkg/common/db/relation/group_request_model.go
index 679671e5d..407c2b136 100644
--- a/pkg/common/db/relation/group_request_model.go
+++ b/pkg/common/db/relation/group_request_model.go
@@ -2,6 +2,7 @@ package relation
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil"
 
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go
index b63bada05..432af214f 100644
--- a/pkg/common/db/relation/mysql_init.go
+++ b/pkg/common/db/relation/mysql_init.go
@@ -2,13 +2,14 @@ package relation
 
 import (
 	"fmt"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	mysqlDriver "github.com/go-sql-driver/mysql"
 	"gorm.io/driver/mysql"
-	"time"
 
 	"gorm.io/gorm"
 	"gorm.io/gorm/logger"
diff --git a/pkg/common/db/relation/object_hash_model.go b/pkg/common/db/relation/object_hash_model.go
index e122d9cec..275d09a4e 100644
--- a/pkg/common/db/relation/object_hash_model.go
+++ b/pkg/common/db/relation/object_hash_model.go
@@ -2,6 +2,7 @@ package relation
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"gorm.io/gorm"
diff --git a/pkg/common/db/relation/object_info_model.go b/pkg/common/db/relation/object_info_model.go
index d2a751cff..f5b34755f 100644
--- a/pkg/common/db/relation/object_info_model.go
+++ b/pkg/common/db/relation/object_info_model.go
@@ -2,11 +2,12 @@ package relation
 
 import (
 	"context"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"gorm.io/gorm"
-	"time"
 )
 
 type ObjectInfoGorm struct {
diff --git a/pkg/common/db/relation/object_put_model.go b/pkg/common/db/relation/object_put_model.go
index 82f98624c..06a9883af 100644
--- a/pkg/common/db/relation/object_put_model.go
+++ b/pkg/common/db/relation/object_put_model.go
@@ -2,10 +2,11 @@ package relation
 
 import (
 	"context"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"gorm.io/gorm"
-	"time"
 )
 
 type ObjectPutGorm struct {
diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go
index 3390f7d3b..481393ac0 100644
--- a/pkg/common/db/relation/user_model.go
+++ b/pkg/common/db/relation/user_model.go
@@ -2,9 +2,10 @@ package relation
 
 import (
 	"context"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"time"
 
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"gorm.io/gorm"
diff --git a/pkg/common/db/tx/mongo.go b/pkg/common/db/tx/mongo.go
index f0afaa237..c8c4817ac 100644
--- a/pkg/common/db/tx/mongo.go
+++ b/pkg/common/db/tx/mongo.go
@@ -2,6 +2,7 @@ package tx
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"go.mongodb.org/mongo-driver/mongo"
 )
diff --git a/pkg/common/db/unrelation/super_group.go b/pkg/common/db/unrelation/super_group.go
index 23c226974..54de697e4 100644
--- a/pkg/common/db/unrelation/super_group.go
+++ b/pkg/common/db/unrelation/super_group.go
@@ -2,6 +2,7 @@ package unrelation
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"go.mongodb.org/mongo-driver/bson"
diff --git a/pkg/common/kafka/consumer_group.go b/pkg/common/kafka/consumer_group.go
index 318583852..065fc6277 100644
--- a/pkg/common/kafka/consumer_group.go
+++ b/pkg/common/kafka/consumer_group.go
@@ -8,6 +8,7 @@ package kafka
 
 import (
 	"context"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 
 	"github.com/Shopify/sarama"
diff --git a/pkg/common/mw/rpc_server_interceptor.go b/pkg/common/mw/rpc_server_interceptor.go
index 518b5f0a2..be37fc0fb 100644
--- a/pkg/common/mw/rpc_server_interceptor.go
+++ b/pkg/common/mw/rpc_server_interceptor.go
@@ -3,11 +3,12 @@ package mw
 import (
 	"context"
 	"fmt"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/checker"
 	"math"
 	"runtime"
 	"strings"
 
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/checker"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
diff --git a/pkg/common/prome/prometheus.go b/pkg/common/prome/prometheus.go
index a41626cd0..299f07d43 100644
--- a/pkg/common/prome/prometheus.go
+++ b/pkg/common/prome/prometheus.go
@@ -2,10 +2,11 @@ package prome
 
 import (
 	"bytes"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"net/http"
 	"strconv"
 
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
+
 	"github.com/gin-gonic/gin"
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
diff --git a/pkg/common/tokenverify/jwt_token.go b/pkg/common/tokenverify/jwt_token.go
index 7d634af3e..582a7f68e 100644
--- a/pkg/common/tokenverify/jwt_token.go
+++ b/pkg/common/tokenverify/jwt_token.go
@@ -3,12 +3,13 @@ package tokenverify
 import (
 	"context"
 	"fmt"
+	"time"
+
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
 	"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
 	"github.com/golang-jwt/jwt/v4"
-	"time"
 )
 
 type Claims struct {
diff --git a/pkg/errs/coderr.go b/pkg/errs/coderr.go
index b8371bd5b..506a0ddcc 100644
--- a/pkg/errs/coderr.go
+++ b/pkg/errs/coderr.go
@@ -2,8 +2,9 @@ package errs
 
 import (
 	"fmt"
-	"github.com/pkg/errors"
 	"strings"
+
+	"github.com/pkg/errors"
 )
 
 type CodeError interface {
diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go
index c5343c677..095998cc6 100644
--- a/pkg/proto/auth/auth.pb.go
+++ b/pkg/proto/auth/auth.pb.go
@@ -8,13 +8,14 @@ package auth
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/conversation/conversation.pb.go b/pkg/proto/conversation/conversation.pb.go
index cab6772e9..8c7451a3d 100644
--- a/pkg/proto/conversation/conversation.pb.go
+++ b/pkg/proto/conversation/conversation.pb.go
@@ -8,14 +8,15 @@ package conversation
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/errinfo/errinfo.pb.go b/pkg/proto/errinfo/errinfo.pb.go
index 4db1d6d95..ae10fe976 100644
--- a/pkg/proto/errinfo/errinfo.pb.go
+++ b/pkg/proto/errinfo/errinfo.pb.go
@@ -7,10 +7,11 @@
 package errinfo
 
 import (
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
 	sync "sync"
+
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 )
 
 const (
diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go
index fd97cefb3..515ac8128 100644
--- a/pkg/proto/friend/friend.pb.go
+++ b/pkg/proto/friend/friend.pb.go
@@ -8,14 +8,15 @@ package friend
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go
index 5febafa2f..5024365cc 100644
--- a/pkg/proto/group/group.pb.go
+++ b/pkg/proto/group/group.pb.go
@@ -8,6 +8,9 @@ package group
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
 	grpc "google.golang.org/grpc"
@@ -15,8 +18,6 @@ import (
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go
index e283b7573..4a35ebe4f 100644
--- a/pkg/proto/msg/msg.pb.go
+++ b/pkg/proto/msg/msg.pb.go
@@ -8,6 +8,9 @@ package msg
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
 	grpc "google.golang.org/grpc"
@@ -15,8 +18,6 @@ import (
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/msggateway/msggateway.pb.go b/pkg/proto/msggateway/msggateway.pb.go
index 40751e999..9b247c65a 100644
--- a/pkg/proto/msggateway/msggateway.pb.go
+++ b/pkg/proto/msggateway/msggateway.pb.go
@@ -8,14 +8,15 @@ package msggateway
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go
index 223ecb998..1e6a895f1 100644
--- a/pkg/proto/push/push.pb.go
+++ b/pkg/proto/push/push.pb.go
@@ -8,14 +8,15 @@ package push
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/sdkws/sdkws.pb.go b/pkg/proto/sdkws/sdkws.pb.go
index c8ed2a728..13637d3c9 100644
--- a/pkg/proto/sdkws/sdkws.pb.go
+++ b/pkg/proto/sdkws/sdkws.pb.go
@@ -7,11 +7,12 @@
 package sdkws
 
 import (
+	reflect "reflect"
+	sync "sync"
+
 	wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/statistics/statistics.pb.go b/pkg/proto/statistics/statistics.pb.go
index 6943736ec..092f67b52 100644
--- a/pkg/proto/statistics/statistics.pb.go
+++ b/pkg/proto/statistics/statistics.pb.go
@@ -7,9 +7,10 @@
 package statistics
 
 import (
+	reflect "reflect"
+
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
 )
 
 const (
diff --git a/pkg/proto/third/third.pb.go b/pkg/proto/third/third.pb.go
index 40268e683..a2512db38 100644
--- a/pkg/proto/third/third.pb.go
+++ b/pkg/proto/third/third.pb.go
@@ -8,13 +8,14 @@ package third
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go
index f0db26e04..b55abd968 100644
--- a/pkg/proto/user/user.pb.go
+++ b/pkg/proto/user/user.pb.go
@@ -8,6 +8,9 @@ package user
 
 import (
 	context "context"
+	reflect "reflect"
+	sync "sync"
+
 	conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
 	sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
 	grpc "google.golang.org/grpc"
@@ -15,8 +18,6 @@ import (
 	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	reflect "reflect"
-	sync "sync"
 )
 
 const (
diff --git a/pkg/proto/wrapperspb/wrapperspb.pb.go b/pkg/proto/wrapperspb/wrapperspb.pb.go
index 0e079bf36..2bb8b39db 100644
--- a/pkg/proto/wrapperspb/wrapperspb.pb.go
+++ b/pkg/proto/wrapperspb/wrapperspb.pb.go
@@ -7,10 +7,11 @@
 package wrapperspb
 
 import (
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
 	sync "sync"
+
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 )
 
 const (
diff --git a/pkg/statistics/statistics.go b/pkg/statistics/statistics.go
index 700b24746..3ec3c6aa8 100644
--- a/pkg/statistics/statistics.go
+++ b/pkg/statistics/statistics.go
@@ -2,8 +2,9 @@ package statistics
 
 import (
 	"context"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 	"time"
+
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
 )
 
 type Statistics struct {
diff --git a/pkg/utils/file.go b/pkg/utils/file.go
index d79b11003..7aa7719bd 100644
--- a/pkg/utils/file.go
+++ b/pkg/utils/file.go
@@ -2,13 +2,14 @@ package utils
 
 import (
 	"fmt"
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	"math/rand"
 	"os"
 	"path"
 	"strconv"
 	"strings"
 	"time"
+
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 )
 
 const (
diff --git a/pkg/utils/platform_number_id_to_name_test.go b/pkg/utils/platform_number_id_to_name_test.go
index c671d37cf..78569aed4 100644
--- a/pkg/utils/platform_number_id_to_name_test.go
+++ b/pkg/utils/platform_number_id_to_name_test.go
@@ -1,9 +1,10 @@
 package utils
 
 import (
-	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
 	"testing"
 
+	"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
+
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go
index db1d3ac82..59abb90c4 100644
--- a/pkg/utils/time_format.go
+++ b/pkg/utils/time_format.go
@@ -16,17 +16,17 @@ const (
 	HalfOffset = 12 * 3600 //Half-day hourly offset
 )
 
-//Get the current timestamp by Second
+// Get the current timestamp by Second
 func GetCurrentTimestampBySecond() int64 {
 	return time.Now().Unix()
 }
 
-//Convert timestamp to time.Time type
+// Convert timestamp to time.Time type
 func UnixSecondToTime(second int64) time.Time {
 	return time.Unix(second, 0)
 }
 
-//Convert nano timestamp to time.Time type
+// Convert nano timestamp to time.Time type
 func UnixNanoSecondToTime(nanoSecond int64) time.Time {
 	return time.Unix(0, nanoSecond)
 }
@@ -34,35 +34,35 @@ func UnixMillSecondToTime(millSecond int64) time.Time {
 	return time.Unix(0, millSecond*1e6)
 }
 
-//Get the current timestamp by Nano
+// Get the current timestamp by Nano
 func GetCurrentTimestampByNano() int64 {
 	return time.Now().UnixNano()
 }
 
-//Get the current timestamp by Mill
+// Get the current timestamp by Mill
 func GetCurrentTimestampByMill() int64 {
 	return time.Now().UnixNano() / 1e6
 }
 
-//Get the timestamp at 0 o'clock of the day
+// Get the timestamp at 0 o'clock of the day
 func GetCurDayZeroTimestamp() int64 {
 	timeStr := time.Now().Format("2006-01-02")
 	t, _ := time.Parse("2006-01-02", timeStr)
 	return t.Unix() - TimeOffset
 }
 
-//Get the timestamp at 12 o'clock on the day
+// Get the timestamp at 12 o'clock on the day
 func GetCurDayHalfTimestamp() int64 {
 	return GetCurDayZeroTimestamp() + HalfOffset
 
 }
 
-//Get the formatted time at 0 o'clock of the day, the format is "2006-01-02_00-00-00"
+// Get the formatted time at 0 o'clock of the day, the format is "2006-01-02_00-00-00"
 func GetCurDayZeroTimeFormat() string {
 	return time.Unix(GetCurDayZeroTimestamp(), 0).Format("2006-01-02_15-04-05")
 }
 
-//Get the formatted time at 12 o'clock of the day, the format is "2006-01-02_12-00-00"
+// Get the formatted time at 12 o'clock of the day, the format is "2006-01-02_12-00-00"
 func GetCurDayHalfTimeFormat() string {
 	return time.Unix(GetCurDayZeroTimestamp()+HalfOffset, 0).Format("2006-01-02_15-04-05")
 }
diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk
index 1b70f09da..b12ad0c93 100644
--- a/scripts/make-rules/golang.mk
+++ b/scripts/make-rules/golang.mk
@@ -131,7 +131,7 @@ go.build.multiarch: go.build.verify $(foreach p,$(PLATFORMS),$(addprefix go.buil
 .PHONY: go.lint
 go.lint: tools.verify.golangci-lint
 	@echo "===========> Run golangci to lint source codes"
-	@$(BIN_DIR)/golangci-lint run -c $(ROOT_DIR)/.golangci.yml $(ROOT_DIR)/...
+	@$(TOOLS_BIN)/golangci-lint run -c $(ROOT_DIR)/.golangci.yml $(ROOT_DIR)/...
 
 ## go.test: Run unit test
 .PHONY: go.test
diff --git a/test/mongo/cmd/main.go b/test/mongo/cmd/main.go
index 9b4f315f8..3e4017960 100644
--- a/test/mongo/cmd/main.go
+++ b/test/mongo/cmd/main.go
@@ -20,6 +20,7 @@ import (
 	"context"
 	"flag"
 	"fmt"
+
 	"go.mongodb.org/mongo-driver/mongo"
 	"go.mongodb.org/mongo-driver/mongo/options"
 )
diff --git a/test/mongo/mongo_utils.go b/test/mongo/mongo_utils.go
index 50d000f99..18cdcbea3 100644
--- a/test/mongo/mongo_utils.go
+++ b/test/mongo/mongo_utils.go
@@ -19,10 +19,11 @@ import (
 	server_api_params "Open_IM/pkg/proto/sdk_ws"
 	"context"
 	"fmt"
+	"time"
+
 	"github.com/golang/protobuf/proto"
 	"go.mongodb.org/mongo-driver/mongo"
 	"gopkg.in/mgo.v2/bson"
-	"time"
 )
 
 var (