From 8729f90d0293347763b57961b9aeb8a1f14e855f Mon Sep 17 00:00:00 2001 From: OpenIM Bot <124379614+kubbot@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:40:26 +0800 Subject: [PATCH] cicd: bump League Patch (#1874) --- cmd/openim-api/main.go | 4 +++- cmd/openim-cmdutils/main.go | 3 ++- cmd/openim-crontask/main.go | 3 ++- cmd/openim-msggateway/main.go | 3 ++- cmd/openim-msgtransfer/main.go | 3 ++- cmd/openim-push/main.go | 3 ++- cmd/openim-rpc/openim-rpc-auth/main.go | 3 ++- cmd/openim-rpc/openim-rpc-conversation/main.go | 3 ++- cmd/openim-rpc/openim-rpc-friend/main.go | 3 ++- cmd/openim-rpc/openim-rpc-group/main.go | 3 ++- cmd/openim-rpc/openim-rpc-msg/main.go | 3 ++- cmd/openim-rpc/openim-rpc-third/main.go | 3 ++- cmd/openim-rpc/openim-rpc-user/main.go | 3 ++- go.mod | 1 - go.sum | 3 --- internal/msgtransfer/init.go | 3 ++- internal/tools/cron_task.go | 3 ++- pkg/common/db/mgo/conversation.go | 3 ++- pkg/common/db/mgo/group.go | 3 ++- pkg/common/db/mgo/group_member.go | 1 + pkg/common/db/mgo/group_request.go | 1 + pkg/common/db/unrelation/mongo.go | 1 + .../discoveryregister/zookeeper/zookeeper.go | 3 ++- pkg/common/kafka/consumer_group.go | 3 ++- pkg/common/kafka/producer.go | 3 ++- tools/component/component.go | 8 +++++--- tools/ncpu/ncpu.go | 14 ++++++++++++++ 27 files changed, 63 insertions(+), 27 deletions(-) diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index 755b35591..a45bcbdd8 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -17,7 +17,6 @@ package main import ( "context" "fmt" - "github.com/OpenIMSDK/tools/errs" "net" "net/http" _ "net/http/pprof" @@ -27,8 +26,11 @@ import ( "syscall" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/openimsdk/open-im-server/v3/internal/api" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" diff --git a/cmd/openim-cmdutils/main.go b/cmd/openim-cmdutils/main.go index a13bc4f33..45b324766 100644 --- a/cmd/openim-cmdutils/main.go +++ b/cmd/openim-cmdutils/main.go @@ -16,8 +16,9 @@ package main import ( "fmt" - "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "os" + + "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" ) func main() { diff --git a/cmd/openim-crontask/main.go b/cmd/openim-crontask/main.go index 5061c5408..324001690 100644 --- a/cmd/openim-crontask/main.go +++ b/cmd/openim-crontask/main.go @@ -16,9 +16,10 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/tools" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" - "os" ) func main() { diff --git a/cmd/openim-msggateway/main.go b/cmd/openim-msggateway/main.go index 25cfe5fa8..5339891c8 100644 --- a/cmd/openim-msggateway/main.go +++ b/cmd/openim-msggateway/main.go @@ -16,8 +16,9 @@ package main import ( "fmt" - "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "os" + + "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" ) func main() { diff --git a/cmd/openim-msgtransfer/main.go b/cmd/openim-msgtransfer/main.go index e3c2f374f..cf1b44a55 100644 --- a/cmd/openim-msgtransfer/main.go +++ b/cmd/openim-msgtransfer/main.go @@ -16,8 +16,9 @@ package main import ( "fmt" - "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "os" + + "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" ) func main() { diff --git a/cmd/openim-push/main.go b/cmd/openim-push/main.go index 79152f945..77f75cb4e 100644 --- a/cmd/openim-push/main.go +++ b/cmd/openim-push/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/push" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-auth/main.go b/cmd/openim-rpc/openim-rpc-auth/main.go index 8ee7053f3..b29efd484 100644 --- a/cmd/openim-rpc/openim-rpc-auth/main.go +++ b/cmd/openim-rpc/openim-rpc-auth/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/auth" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-conversation/main.go b/cmd/openim-rpc/openim-rpc-conversation/main.go index 259d79abf..f9ac8cd27 100644 --- a/cmd/openim-rpc/openim-rpc-conversation/main.go +++ b/cmd/openim-rpc/openim-rpc-conversation/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/conversation" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-friend/main.go b/cmd/openim-rpc/openim-rpc-friend/main.go index bd85da7b0..82d71d522 100644 --- a/cmd/openim-rpc/openim-rpc-friend/main.go +++ b/cmd/openim-rpc/openim-rpc-friend/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/friend" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-group/main.go b/cmd/openim-rpc/openim-rpc-group/main.go index e40c04d19..360042f84 100644 --- a/cmd/openim-rpc/openim-rpc-group/main.go +++ b/cmd/openim-rpc/openim-rpc-group/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/group" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-msg/main.go b/cmd/openim-rpc/openim-rpc-msg/main.go index 989746dc7..bed57f522 100644 --- a/cmd/openim-rpc/openim-rpc-msg/main.go +++ b/cmd/openim-rpc/openim-rpc-msg/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/msg" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-third/main.go b/cmd/openim-rpc/openim-rpc-third/main.go index fbd386946..4868ce149 100644 --- a/cmd/openim-rpc/openim-rpc-third/main.go +++ b/cmd/openim-rpc/openim-rpc-third/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/third" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-user/main.go b/cmd/openim-rpc/openim-rpc-user/main.go index 160bbe311..a77a2f768 100644 --- a/cmd/openim-rpc/openim-rpc-user/main.go +++ b/cmd/openim-rpc/openim-rpc-user/main.go @@ -16,10 +16,11 @@ package main import ( "fmt" + "os" + "github.com/openimsdk/open-im-server/v3/internal/rpc/user" "github.com/openimsdk/open-im-server/v3/pkg/common/cmd" "github.com/openimsdk/open-im-server/v3/pkg/common/config" - "os" ) func main() { diff --git a/go.mod b/go.mod index d82d3390b..3da7c3ecd 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,6 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stathat/consistent v1.0.0 github.com/tencentyun/cos-go-sdk-v5 v0.7.45 - go.uber.org/automaxprocs v1.5.3 golang.org/x/sync v0.4.0 gopkg.in/src-d/go-git.v4 v4.13.1 gotest.tools v2.2.0+incompatible diff --git a/go.sum b/go.sum index fb047dfdc..84620fe7d 100644 --- a/go.sum +++ b/go.sum @@ -277,7 +277,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -352,8 +351,6 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 969761a9d..83ec00749 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -18,11 +18,12 @@ import ( "context" "errors" "fmt" - "github.com/OpenIMSDK/tools/errs" "log" "net/http" "sync" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mw" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go index cf2068d8e..40e1c0a87 100644 --- a/internal/tools/cron_task.go +++ b/internal/tools/cron_task.go @@ -17,12 +17,13 @@ package tools import ( "context" "fmt" - "github.com/OpenIMSDK/tools/errs" "os" "os/signal" "syscall" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/redis/go-redis/v9" "github.com/robfig/cron/v3" diff --git a/pkg/common/db/mgo/conversation.go b/pkg/common/db/mgo/conversation.go index 0b8d597dc..d0a46ae47 100644 --- a/pkg/common/db/mgo/conversation.go +++ b/pkg/common/db/mgo/conversation.go @@ -16,9 +16,10 @@ package mgo import ( "context" - "github.com/OpenIMSDK/tools/errs" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/mgoutil" "github.com/OpenIMSDK/tools/pagination" diff --git a/pkg/common/db/mgo/group.go b/pkg/common/db/mgo/group.go index 9a4c660a6..922bfd424 100644 --- a/pkg/common/db/mgo/group.go +++ b/pkg/common/db/mgo/group.go @@ -16,9 +16,10 @@ package mgo import ( "context" - "github.com/OpenIMSDK/tools/errs" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mgoutil" "github.com/OpenIMSDK/tools/pagination" "go.mongodb.org/mongo-driver/bson" diff --git a/pkg/common/db/mgo/group_member.go b/pkg/common/db/mgo/group_member.go index fce79830e..e28432b11 100644 --- a/pkg/common/db/mgo/group_member.go +++ b/pkg/common/db/mgo/group_member.go @@ -16,6 +16,7 @@ package mgo import ( "context" + "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/protocol/constant" diff --git a/pkg/common/db/mgo/group_request.go b/pkg/common/db/mgo/group_request.go index dce0878ee..d20682239 100644 --- a/pkg/common/db/mgo/group_request.go +++ b/pkg/common/db/mgo/group_request.go @@ -16,6 +16,7 @@ package mgo import ( "context" + "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mgoutil" diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go index 2bade9a62..4c093b3c3 100644 --- a/pkg/common/db/unrelation/mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -27,6 +27,7 @@ import ( "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mw/specialerror" + "github.com/openimsdk/open-im-server/v3/pkg/common/config" "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation" ) diff --git a/pkg/common/discoveryregister/zookeeper/zookeeper.go b/pkg/common/discoveryregister/zookeeper/zookeeper.go index 9c58807c1..6e55b6b8b 100644 --- a/pkg/common/discoveryregister/zookeeper/zookeeper.go +++ b/pkg/common/discoveryregister/zookeeper/zookeeper.go @@ -16,11 +16,12 @@ package zookeeper import ( "fmt" - "github.com/OpenIMSDK/tools/errs" "os" "strings" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/discoveryregistry" openkeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" "github.com/OpenIMSDK/tools/log" diff --git a/pkg/common/kafka/consumer_group.go b/pkg/common/kafka/consumer_group.go index 87e6d5686..6e6f83fca 100644 --- a/pkg/common/kafka/consumer_group.go +++ b/pkg/common/kafka/consumer_group.go @@ -16,9 +16,10 @@ package kafka import ( "context" - "github.com/OpenIMSDK/tools/errs" "strings" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" "github.com/openimsdk/open-im-server/v3/pkg/common/config" diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index b9f0b4656..417aadb54 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -18,10 +18,11 @@ import ( "bytes" "context" "errors" - "github.com/OpenIMSDK/tools/errs" "strings" "time" + "github.com/OpenIMSDK/tools/errs" + "github.com/IBM/sarama" "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/log" diff --git a/tools/component/component.go b/tools/component/component.go index bd6007015..6b879d7f8 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -18,14 +18,16 @@ import ( "errors" "flag" "fmt" + "os" + "strings" + "time" + "github.com/IBM/sarama" + "github.com/openimsdk/open-im-server/v3/pkg/common/db/cache" "github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation" "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/zookeeper" "github.com/openimsdk/open-im-server/v3/pkg/common/kafka" - "os" - "strings" - "time" "github.com/OpenIMSDK/tools/component" "github.com/OpenIMSDK/tools/errs" diff --git a/tools/ncpu/ncpu.go b/tools/ncpu/ncpu.go index ca2409a6f..062618b27 100644 --- a/tools/ncpu/ncpu.go +++ b/tools/ncpu/ncpu.go @@ -1,3 +1,17 @@ +// Copyright © 2024 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import (