Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase openim main to release-v3.5 #1687

Merged
merged 2 commits into from
Jan 4, 2024
Merged

rebase openim main to release-v3.5 #1687

merged 2 commits into from
Jan 4, 2024

Conversation

cubxxw
Copy link
Contributor

@cubxxw cubxxw commented Jan 4, 2024


🔍 What type of PR is this?

👀 What this PR does / why we need it:

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🅰 Which issue(s) this PR fixes:

Fixes #

📝 Special notes for your reviewer:

🎯 Describe how to verify it

📑 Additional documentation e.g., RFC, notion, Google docs, usage docs, etc.:

skiffer-git and others added 2 commits January 4, 2024 12:50
* MongoDB supports non-root users

Signed-off-by: skiffer-git <44203734@qq.com>

* Update component.go

* Update env-template.yaml

* Update docker-compose.yml

* Update environment.sh

* Update openim.yaml

* Update mongo-init.sh

---------

Signed-off-by: skiffer-git <44203734@qq.com>
Co-authored-by: Xinwei Xiong <3293172751@qq.com>
* fix: fix the bug

* fix: fix the imAdmin permission and searchNoficitaion resp

* 2023 Annual Summary Reflections and Aspirations

Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>

* fix: dissmissGroup and lack of keyword bug (#1678)

* Update docker-start-all.sh

* Update env-template.yaml

* Update docker-start-all.sh

---------

Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
Co-authored-by: luhaoling <2198702716@qq.com>
Co-authored-by: Brabem <69128477+luhaoling@users.noreply.github.com>
Co-authored-by: OpenIM Bot <124379614+kubbot@users.noreply.github.com>
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 4, 2024
Copy link
Contributor

sweep-ai bot commented Jan 4, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link
Contributor

sweep-ai bot commented Jan 4, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run make cover
yielded the following error:
##[error]Process completed with exit code 2.
Post job cleanup.
##[error]analyze post-action step failed: Config file could not be found at expected location. Did the 'init' action fail to start?
##[group]Run sudo make lint
�[36;1msudo make lint�[0m
�[36;1mecho "Run go lint successfully" �[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
===========> Verifying golangci-lint is installed
===========> Installing The default installation path is /home/runner/work/open-im-server/open-im-server/_output/tools/golangci-lint
go: downloading github.com/golangci/golangci-lint v1.55.2
go: downloading github.com/fatih/color v1.15.0
go: downloading github.com/gofrs/flock v0.8.1
go: downloading github.com/spf13/viper v1.12.0
go: downloading golang.org/x/tools v0.14.0
go: downloading github.com/hashicorp/go-version v1.6.0
go: downloading github.com/ldez/gomoddirectives v0.2.3
go: downloading golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/go-xmlfmt/xmlfmt v1.1.2
go: downloading github.com/mattn/go-isatty v0.0.17
go: downloading golang.org/x/mod v0.13.0
go: downloading github.com/fsnotify/fsnotify v1.5.4
go: downloading github.com/spf13/afero v1.8.2
go: downloading github.com/spf13/cast v1.5.0
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/golangci/revgrep v0.5.2
go: downloading 4d63.com/gocheckcompilerdirectives v1.2.1
go: downloading 4d63.com/gochecknoglobals v0.2.1
go: downloading github.com/4meepo/tagalign v1.3.3
go: downloading github.com/Abirdcfly/dupword v0.0.13
go: downloading github.com/Antonboom/errname v0.1.12
go: downloading github.com/Antonboom/nilnil v0.1.7
go: downloading github.com/Antonboom/testifylint v0.2.3
go: downloading github.com/BurntSushi/toml v1.3.2
go: downloading github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
go: downloading github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0
go: downloading github.com/OpenPeeDeeP/depguard/v2 v2.1.0
go: downloading github.com/alecthomas/go-check-sumtype v0.1.3
go: downloading github.com/alexkohler/nakedret/v2 v2.0.2
go: downloading github.com/alexkohler/prealloc v1.0.0
go: downloading github.com/alingse/asasalint v0.0.11
go: downloading github.com/ashanbrown/forbidigo v1.6.0
go: downloading github.com/ashanbrown/makezero v1.1.1
go: downloading github.com/bkielbasa/cyclop v1.2.1
go: downloading github.com/blizzy78/varnamelen v0.8.0
go: downloading github.com/bombsimon/wsl/v3 v3.4.0
go: downloading github.com/breml/bidichk v0.2.7
go: downloading github.com/breml/errchkjson v0.3.6
go: downloading github.com/butuzov/ireturn v0.2.2
go: downloading github.com/butuzov/mirror v1.1.0
go: downloading github.com/catenacyber/perfsprint v0.2.0
go: downloading github.com/charithe/durationcheck v0.0.10
go: downloading github.com/curioswitch/go-reassign v0.2.0
go: downloading github.com/daixiang0/gci v0.11.2
go: downloading github.com/denis-tingaikin/go-header v0.4.3
go: downloading github.com/esimonov/ifshort v1.0.4
go: downloading github.com/firefart/nonamedreturns v1.0.4
go: downloading github.com/fzipp/gocyclo v0.6.0
go: downloading github.com/ghostiam/protogetter v0.2.3
go: downloading github.com/go-critic/go-critic v0.9.0
go: downloading github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
go: downloading github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
go: downloading github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe
go: downloading github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e
go: downloading github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0
go: downloading github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
go: downloading github.com/golangci/misspell v0.4.1
go: downloading github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
go: downloading github.com/gostaticanalysis/forcetypeassert v0.1.0
go: downloading github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601
go: downloading github.com/gostaticanalysis/nilerr v0.1.1
go: downloading github.com/hexops/gotextdiff v1.0.3
go: downloading github.com/jgautheron/goconst v1.6.0
go: downloading github.com/jingyugao/rowserrcheck v1.1.1
go: downloading github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af
go: downloading github.com/julz/importas v0.1.0
go: downloading github.com/kisielk/errcheck v1.6.3
go: downloading github.com/kkHAIKE/contextcheck v1.1.4
go: downloading github.com/kulti/thelper v0.6.3
go: downloading github.com/kunwardeep/paralleltest v1.0.8
go: downloading github.com/kyoh86/exportloopref v0.1.11
go: downloading github.com/ldez/tagliatelle v0.5.0
go: downloading github.com/leonklingele/grouper v1.1.1
go: downloading github.com/lufeee/execinquery v1.2.1
go: downloading github.com/macabu/inamedparam v0.1.2
go: downloading github.com/maratori/testableexamples v1.0.0
go: downloading github.com/maratori/testpackage v1.1.1
go: downloading github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
go: downloading github.com/mbilski/exhaustivestruct v1.2.0
go: downloading github.com/mgechev/revive v1.3.4
go: downloading github.com/moricho/tparallel v0.3.1
go: downloading github.com/nakabonne/nestif v0.3.1
go: downloading github.com/nishanths/exhaustive v0.11.0
go: downloading github.com/nishanths/predeclared v0.2.2
go: downloading github.com/nunnatsa/ginkgolinter v0.14.1
go: downloading github.com/polyfloyd/go-errorlint v1.4.5
go: downloading github.com/ryancurrah/gomodguard v1.3.0
go: downloading github.com/ryanrolds/sqlclosecheck v0.5.1
go: downloading github.com/sanposhiho/wastedassign/v2 v2.0.7
go: downloading github.com/sashamelentyev/interfacebloat v1.1.0
go: downloading github.com/sashamelentyev/usestdlibvars v1.24.0
go: downloading github.com/securego/gosec/v2 v2.18.2
go: downloading github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
go: downloading github.com/sivchari/containedctx v1.0.3
go: downloading github.com/sivchari/nosnakecase v1.7.0
go: downloading github.com/sivchari/tenv v1.7.1
go: downloading github.com/sonatard/noctx v0.0.2
go: downloading github.com/sourcegraph/go-diff v0.7.0
go: downloading github.com/ssgreg/nlreturn/v2 v2.2.1
go: downloading github.com/stbenjam/no-sprintf-host-port v0.1.1
go: downloading github.com/tdakkota/asciicheck v0.2.0
go: downloading github.com/tetafro/godot v1.4.15
go: downloading github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966
go: downloading github.com/timonwong/loggercheck v0.9.4
go: downloading github.com/tomarrell/wrapcheck/v2 v2.8.1
go: downloading github.com/tommy-muehle/go-mnd/v2 v2.5.1
go: downloading github.com/ultraware/funlen v0.1.0
go: downloading github.com/ultraware/whitespace v0.0.5
go: downloading github.com/uudashr/gocognit v1.1.2
go: downloading github.com/xen0n/gosmopolitan v1.2.2
go: downloading github.com/yagipy/maintidx v1.0.0
go: downloading github.com/yeya24/promlinter v0.2.0
go: downloading github.com/ykadowak/zerologlint v0.1.3
go: downloading gitlab.com/bosi/decorder v0.4.1
go: downloading go-simpler.org/sloglint v0.1.2
go: downloading go.tmz.dev/musttag v0.7.2
go: downloading honnef.co/go/tools v0.4.6
go: downloading mvdan.cc/gofumpt v0.5.0
go: downloading mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
go: downloading golang.org/x/sys v0.13.0
go: downloading mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d
go: downloading github.com/subosito/gotenv v1.4.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/magiconair/properties v1.8.6
go: downloading github.com/pelletier/go-toml/v2 v2.0.5
go: downloading github.com/gobwas/glob v0.2.3
go: downloading github.com/go-toolsmith/astcast v1.1.0
go: downloading github.com/pelletier/go-toml v1.9.5
go: downloading github.com/go-toolsmith/astcopy v1.1.0
go: downloading github.com/go-toolsmith/astfmt v1.1.0
go: downloading github.com/go-toolsmith/astequal v1.1.0
go: downloading github.com/go-toolsmith/astp v1.1.0
go: downloading github.com/go-toolsmith/strparse v1.1.0
go: downloading github.com/go-toolsmith/typep v1.1.0
go: downloading github.com/quasilyte/go-ruleguard v0.4.0
go: downloading github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727
go: downloading github.com/kisielk/gotool v1.0.0
go: downloading github.com/gostaticanalysis/comment v1.4.2
go: downloading github.com/gostaticanalysis/analysisutil v0.7.1
go: downloading github.com/ettle/strcase v0.1.1
go: downloading github.com/ccojocar/zxcvbn-go v1.0.1
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/prometheus/client_golang v1.12.1
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833
go: downloading mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b
go: downloading github.com/quasilyte/gogrep v0.5.0
go: downloading github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567
go: downloading github.com/chavacava/garif v0.1.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/prometheus/common v0.32.1
go: downloading github.com/prometheus/procfs v0.7.3
go: downloading google.golang.org/protobuf v1.28.0
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
===========> golangci-lint is install in /home/runner/work/open-im-server/open-im-server/_output/tools/golangci-lint
===========> Run golangci to lint source codes
�[1minternal/api/msg.go:317�[0m:17: �[31mshadow: declaration of "err" shadows declaration at line 312�[0m (govet)
			recvIDsPart, err := m.userRpcClient.GetAllUserIDs(c, int32(pageNumber), int32(showNumber))
			             �[33m^�[0m
�[1minternal/msggateway/client.go:79�[0m:6: �[31mfunc `newClient` is unused�[0m (unused)
func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client {
     �[33m^�[0m
�[1minternal/msggateway/long_conn.go:111�[0m:2: �[31mS1008: should use 'return d.conn == nil' instead of 'if d.conn != nil { return false }; return true'�[0m (gosimple)
	if d.conn != nil {
	�[33m^�[0m
�[1minternal/msggateway/n_ws_server.go:67�[0m:5: �[31mvar `bufferPool` is unused�[0m (unused)
var bufferPool = sync.Pool{
    �[33m^�[0m
�[1minternal/msggateway/user_map.go:61�[0m:77: �[31mcopylocks: call of log.ZDebug copies lock value: github.com/openimsdk/open-im-server/v3/internal/msggateway.Client contains sync/atomic.Bool contains sync/atomic.noCopy�[0m (govet)
		log.ZDebug(context.Background(), "Set existed", "user_id", key, "client", *v)
		                                                                          �[33m^�[0m
�[1minternal/msggateway/user_map.go:66�[0m:81: �[31mcopylocks: call of log.ZDebug copies lock value: github.com/openimsdk/open-im-server/v3/internal/msggateway.Client contains sync/atomic.Bool contains sync/atomic.noCopy�[0m (govet)
		log.ZDebug(context.Background(), "Set not existed", "user_id", key, "client", *v)
		                                                                              �[33m^�[0m
�[1minternal/msgtransfer/init.go:55�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 47�[0m (govet)
	if err := mongo.CreateMsgIndex(); err != nil {
	   �[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:76�[0m:2: �[31mfield `singleMsgSuccessCount` is unused�[0m (unused)
	singleMsgSuccessCount      uint64
	�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:77�[0m:2: �[31mfield `singleMsgFailedCount` is unused�[0m (unused)
	singleMsgFailedCount       uint64
	�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:78�[0m:2: �[31mfield `singleMsgSuccessCountMutex` is unused�[0m (unused)
	singleMsgSuccessCountMutex sync.Mutex
	�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:79�[0m:2: �[31mfield `singleMsgFailedCountMutex` is unused�[0m (unused)
	singleMsgFailedCountMutex  sync.Mutex
	�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:112�[0m:2: �[31mS1000: should use for range instead of for { select {} }�[0m (gosimple)
	for {
	�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:269�[0m:30: �[31mError return value of `och.msgDatabase.MsgToPushMQ` is not checked�[0m (errcheck)
		och.msgDatabase.MsgToPushMQ(ctx, key, conversationID, v)
		                           �[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:290�[0m:14: �[31mshadow: declaration of "err" shadows declaration at line 280�[0m (govet)
				userIDs, err := och.groupRpcClient.GetGroupMemberIDs(ctx, storageList[0].GroupID)
				         �[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:302�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 280�[0m (govet)
				if err := och.conversationRpcClient.SingleChatFirstCreateConversation(ctx, storageList[0].RecvID,
				   �[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:325�[0m:3: �[31mS1000: should use a simple channel send/receive instead of `select` with a single case�[0m (gosimple)
		select {
		�[33m^�[0m
�[1minternal/msgtransfer/online_history_msg_handler.go:439�[0m:3: �[31mS1000: should use for range instead of for { select {} }�[0m (gosimple)
		for {
		�[33m^�[0m
�[1minternal/push/callback.go:134�[0m:2: �[31munreachable: unreachable code�[0m (govet)
	if len(resp.UserIDs) != 0 {
	�[33m^�[0m
�[1minternal/push/consumer_init.go:19�[0m:2: �[31mfield `successCount` is unused�[0m (unused)
	successCount uint64
	�[33m^�[0m
�[1minternal/push/offlinepush/fcm/push.go:127�[0m:4: �[31mSA4006: this value of `Fail` is never used�[0m (staticcheck)
			Fail = Fail + messageCount
			�[33m^�[0m
�[1minternal/push/offlinepush/fcm/push.go:130�[0m:4: �[31mSA4006: this value of `Success` is never used�[0m (staticcheck)
			Success = Success + response.SuccessCount
			�[33m^�[0m
�[1minternal/push/offlinepush/fcm/push.go:131�[0m:4: �[31mSA4006: this value of `Fail` is never used�[0m (staticcheck)
			Fail = Fail + response.FailureCount
			�[33m^�[0m
�[1minternal/rpc/friend/black.go:31�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 30�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/black.go:87�[0m:45: �[31mError return value of `s.notificationSender.BlackAddedNotification` is not checked�[0m (errcheck)
	s.notificationSender.BlackAddedNotification(ctx, req)
	                                           �[33m^�[0m
�[1minternal/rpc/friend/friend.go:118�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 115�[0m (govet)
	if err := authverify.CheckAccessV3(ctx, req.FromUserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:127�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 115�[0m (govet)
	if _, err := s.userRpcClient.GetUsersInfoMap(ctx, []string{req.ToUserID, req.FromUserID}); err != nil {
	      �[33m^�[0m
�[1minternal/rpc/friend/friend.go:140�[0m:55: �[31mError return value of `s.notificationSender.FriendApplicationAddNotification` is not checked�[0m (errcheck)
	s.notificationSender.FriendApplicationAddNotification(ctx, req)
	                                                     �[33m^�[0m
�[1minternal/rpc/friend/friend.go:170�[0m:59: �[31mError return value of `s.notificationSender.FriendApplicationAgreedNotification` is not checked�[0m (errcheck)
		s.notificationSender.FriendApplicationAgreedNotification(ctx, &pbfriend.RespondFriendApplyReq{
		                                                        �[33m^�[0m
�[1minternal/rpc/friend/friend.go:204�[0m:59: �[31mError return value of `s.notificationSender.FriendApplicationAgreedNotification` is not checked�[0m (errcheck)
		s.notificationSender.FriendApplicationAgreedNotification(ctx, req)
		                                                        �[33m^�[0m
�[1minternal/rpc/friend/friend.go:212�[0m:60: �[31mError return value of `s.notificationSender.FriendApplicationRefusedNotification` is not checked�[0m (errcheck)
		s.notificationSender.FriendApplicationRefusedNotification(ctx, req)
		                                                         �[33m^�[0m
�[1minternal/rpc/friend/friend.go:222�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 219�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.OwnerUserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:232�[0m:48: �[31mError return value of `s.notificationSender.FriendDeletedNotification` is not checked�[0m (errcheck)
	s.notificationSender.FriendDeletedNotification(ctx, req)
	                                              �[33m^�[0m
�[1minternal/rpc/friend/friend.go:247�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 240�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.OwnerUserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:260�[0m:50: �[31mError return value of `s.notificationSender.FriendRemarkSetNotification` is not checked�[0m (errcheck)
	s.notificationSender.FriendRemarkSetNotification(ctx, req.OwnerUserID, req.FriendUserID)
	                                                �[33m^�[0m
�[1minternal/rpc/friend/friend.go:298�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 296�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:318�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 315�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:346�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 344�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/friend/friend.go:364�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 362�[0m (govet)
	if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:285�[0m:42: �[31mError return value of `s.Notification.SuperGroupNotification` is not checked�[0m (errcheck)
				s.Notification.SuperGroupNotification(ctx, userID, userID)
				                                     �[33m^�[0m
�[1minternal/rpc/group/group.go:303�[0m:42: �[31mError return value of `s.Notification.GroupCreatedNotification` is not checked�[0m (errcheck)
		s.Notification.GroupCreatedNotification(ctx, tips)
		                                       �[33m^�[0m
�[1minternal/rpc/group/group.go:424�[0m:53: �[31mError return value of `s.Notification.JoinGroupApplicationNotification` is not checked�[0m (errcheck)
					s.Notification.JoinGroupApplicationNotification(ctx, &pbgroup.JoinGroupReq{
					                                               �[33m^�[0m
�[1minternal/rpc/group/group.go:458�[0m:42: �[31mError return value of `s.Notification.MemberInvitedNotification` is not checked�[0m (errcheck)
	s.Notification.MemberInvitedNotification(ctx, req.GroupID, req.Reason, req.InvitedUserIDs)
	                                        �[33m^�[0m
�[1minternal/rpc/group/group.go:540�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 522�[0m (govet)
	if err := s.PopulateGroupMember(ctx, members...); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:614�[0m:41: �[31mError return value of `s.Notification.MemberKickedNotification` is not checked�[0m (errcheck)
	s.Notification.MemberKickedNotification(ctx, tips)
	                                       �[33m^�[0m
�[1minternal/rpc/group/group.go:766�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 754�[0m (govet)
	if _, err := s.db.TakeGroupMember(ctx, req.GroupID, req.FromUserID); err == nil {
	      �[33m^�[0m
�[1minternal/rpc/group/group.go:771�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 754�[0m (govet)
	if _, err := s.User.GetPublicUserInfo(ctx, req.FromUserID); err != nil {
	      �[33m^�[0m
�[1minternal/rpc/group/group.go:802�[0m:54: �[31mError return value of `s.Notification.GroupApplicationAcceptedNotification` is not checked�[0m (errcheck)
		s.Notification.GroupApplicationAcceptedNotification(ctx, req)
		                                                   �[33m^�[0m
�[1minternal/rpc/group/group.go:806�[0m:42: �[31mError return value of `s.Notification.MemberEnterNotification` is not checked�[0m (errcheck)
			s.Notification.MemberEnterNotification(ctx, req.GroupID, req.FromUserID)
			                                      �[33m^�[0m
�[1minternal/rpc/group/group.go:809�[0m:54: �[31mError return value of `s.Notification.GroupApplicationRejectedNotification` is not checked�[0m (errcheck)
		s.Notification.GroupApplicationRejectedNotification(ctx, req)
		                                                   �[33m^�[0m
�[1minternal/rpc/group/group.go:858�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 815�[0m (govet)
		if err := CallbackBeforeMemberJoinGroup(ctx, groupMember, group.Ex); err != nil {
		   �[33m^�[0m
�[1minternal/rpc/group/group.go:861�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 815�[0m (govet)
		if err := s.db.CreateGroup(ctx, nil, []*relationtb.GroupMemberModel{groupMember}); err != nil {
		   �[33m^�[0m
�[1minternal/rpc/group/group.go:865�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 815�[0m (govet)
		if err := s.conversationRpcClient.GroupChatFirstCreateConversation(ctx, req.GroupID, []string{req.InviterUserID}); err != nil {
		   �[33m^�[0m
�[1minternal/rpc/group/group.go:868�[0m:41: �[31mError return value of `s.Notification.MemberEnterNotification` is not checked�[0m (errcheck)
		s.Notification.MemberEnterNotification(ctx, req.GroupID, req.InviterUserID)
		                                      �[33m^�[0m
�[1minternal/rpc/group/group.go:886�[0m:49: �[31mError return value of `s.Notification.JoinGroupApplicationNotification` is not checked�[0m (errcheck)
	s.Notification.JoinGroupApplicationNotification(ctx, req)
	                                               �[33m^�[0m
�[1minternal/rpc/group/group.go:906�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 899�[0m (govet)
	if err := s.PopulateGroupMember(ctx, member); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:968�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 952�[0m (govet)
	if err := s.PopulateGroupMember(ctx, owner); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:975�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 952�[0m (govet)
	if err := s.db.UpdateGroup(ctx, group.GroupID, update); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:1067�[0m:50: �[31mError return value of `s.Notification.GroupOwnerTransferredNotification` is not checked�[0m (errcheck)
	s.Notification.GroupOwnerTransferredNotification(ctx, req)
	                                                �[33m^�[0m
�[1minternal/rpc/group/group.go:1169�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 1143�[0m (govet)
	if err := s.PopulateGroupMember(ctx, owners...); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:1201�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 1192�[0m (govet)
	if err := s.PopulateGroupMember(ctx, owner); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:1208�[0m:5: �[31mS1002: should omit comparison to bool constant, can be simplified to `!req.DeleteMember`�[0m (gosimple)
	if req.DeleteMember == false && group.Status == constant.GroupStatusDismissed {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:1211�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 1192�[0m (govet)
	if err := s.db.DismissGroup(ctx, req.GroupID, req.DeleteMember); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/group/group.go:1215�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 1192�[0m (govet)
		num, err := s.db.FindGroupMemberNum(ctx, req.GroupID)
		     �[33m^�[0m
�[1minternal/rpc/group/group.go:1226�[0m:44: �[31mError return value of `s.Notification.GroupDismissedNotification` is not checked�[0m (errcheck)
		s.Notification.GroupDismissedNotification(ctx, tips)
		                                         �[33m^�[0m
�[1minternal/rpc/group/group.go:1276�[0m:45: �[31mError return value of `s.Notification.GroupMemberMutedNotification` is not checked�[0m (errcheck)
	s.Notification.GroupMemberMutedNotification(ctx, req.GroupID, req.UserID, req.MutedSeconds)
	                                           �[33m^�[0m
�[1minternal/rpc/group/group.go:1310�[0m:51: �[31mError return value of `s.Notification.GroupMemberCancelMutedNotification` is not checked�[0m (errcheck)
	s.Notification.GroupMemberCancelMutedNotification(ctx, req.GroupID, req.UserID)
	                                                 �[33m^�[0m
�[1minternal/rpc/group/group.go:1322�[0m:39: �[31mError return value of `s.Notification.GroupMutedNotification` is not checked�[0m (errcheck)
	s.Notification.GroupMutedNotification(ctx, req.GroupID)
	                                     �[33m^�[0m
�[1minternal/rpc/group/group.go:1334�[0m:45: �[31mError return value of `s.Notification.GroupCancelMutedNotification` is not checked�[0m (errcheck)
	s.Notification.GroupCancelMutedNotification(ctx, req.GroupID)
	                                           �[33m^�[0m
�[1minternal/rpc/group/group.go:1447�[0m:53: �[31mError return value of `s.Notification.GroupMemberSetToAdminNotification` is not checked�[0m (errcheck)
				s.Notification.GroupMemberSetToAdminNotification(ctx, member.GroupID, member.UserID)
				                                                �[33m^�[0m
�[1minternal/rpc/group/group.go:1449�[0m:60: �[31mError return value of `s.Notification.GroupMemberSetToOrdinaryUserNotification` is not checked�[0m (errcheck)
				s.Notification.GroupMemberSetToOrdinaryUserNotification(ctx, member.GroupID, member.UserID)
				                                                       �[33m^�[0m
�[1minternal/rpc/group/group.go:1453�[0m:49: �[31mError return value of `s.Notification.GroupMemberInfoSetNotification` is not checked�[0m (errcheck)
			s.Notification.GroupMemberInfoSetNotification(ctx, member.GroupID, member.UserID)
			                                             �[33m^�[0m
�[1minternal/rpc/group/group.go:1567�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 1543�[0m (govet)
	if err := s.PopulateGroupMember(ctx, owners...); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/msg/as_read.go:85�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 77�[0m (govet)
	if err := m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/msg/delete.go:90�[0m:52: �[31mError return value of `m.notificationSender.NotificationWithSesstionType` is not checked�[0m (errcheck)
		m.notificationSender.NotificationWithSesstionType(
		                                                 �[33m^�[0m
�[1minternal/rpc/msg/delete.go:104�[0m:53: �[31mError return value of `m.notificationSender.NotificationWithSesstionType` is not checked�[0m (errcheck)
			m.notificationSender.NotificationWithSesstionType(ctx, req.UserID, req.UserID, constant.DeleteMsgsNotification, constant.SingleChatType, tips)
			                                                 �[33m^�[0m
�[1minternal/rpc/msg/delete.go:175�[0m:53: �[31mError return value of `m.notificationSender.NotificationWithSesstionType` is not checked�[0m (errcheck)
			m.notificationSender.NotificationWithSesstionType(
			                                                 �[33m^�[0m
�[1minternal/rpc/msg/delete.go:190�[0m:53: �[31mError return value of `m.notificationSender.NotificationWithSesstionType` is not checked�[0m (errcheck)
			m.notificationSender.NotificationWithSesstionType(ctx, userID, m.conversationAndGetRecvID(conversation, userID), constant.ClearConversationNotification, conversation.ConversationType, tips)
			                                                 �[33m^�[0m
�[1minternal/rpc/msg/revoke.go:71�[0m:7: �[31mshadow: declaration of "err" shadows declaration at line 50�[0m (govet)
			if err := authverify.CheckAccessV3(ctx, msgs[0].SendID); err != nil {
			   �[33m^�[0m
�[1minternal/rpc/msg/revoke.go:76�[0m:13: �[31mshadow: declaration of "err" shadows declaration at line 50�[0m (govet)
			members, err := m.Group.GetGroupMemberInfoMap(
			         �[33m^�[0m
�[1minternal/rpc/msg/revoke.go:129�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 50�[0m (govet)
	if err := m.notificationSender.NotificationWithSesstionType(ctx, req.UserID, recvID, constant.MsgRevokeNotification, msgs[0].SessionType, &tips); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/msg/send.go:68�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 60�[0m (govet)
	if err := callbackMsgModify(ctx, req); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/msg/send.go:110�[0m:4: �[31mshadow: declaration of "err" shadows declaration at line 100�[0m (govet)
			err := m.Conversation.SetConversations(ctx, atUserID, conversation)
			�[33m^�[0m
�[1minternal/rpc/msg/send.go:146�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 145�[0m (govet)
	if err := m.messageVerification(ctx, req); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/msg/send.go:170�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 145�[0m (govet)
		if err := callbackMsgModify(ctx, req); err != nil {
		   �[33m^�[0m
�[1minternal/rpc/msg/send.go:173�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 145�[0m (govet)
		if err := m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForSingle(req.MsgData.SendID, req.MsgData.RecvID), req.MsgData); err != nil {
		   �[33m^�[0m
�[1minternal/rpc/msg/server.go:54�[0m:21: �[31mfunc `(*msgServer).execInterceptorHandler` is unused�[0m (unused)
func (m *msgServer) execInterceptorHandler(ctx context.Context, req *msg.SendMsgReq) error {
                    �[33m^�[0m
�[1minternal/rpc/msg/sync_msg.go:171�[0m:25: �[31mError return value of `utils.CopyStructFields` is not checked�[0m (errcheck)
		utils.CopyStructFields(pbchatLog, chatLog)
		                      �[33m^�[0m
�[1minternal/rpc/third/log.go:36�[0m:11: �[31mError return value of `rand.Read` is not checked�[0m (errcheck)
	rand.Read(data)
	         �[33m^�[0m
�[1minternal/rpc/third/s3.go:78�[0m:7: �[31mshadow: declaration of "err" shadows declaration at line 65�[0m (govet)
			if err := t.s3dataBase.SetObject(ctx, obj); err != nil {
			   �[33m^�[0m
�[1minternal/rpc/third/s3.go:260�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 255�[0m (govet)
	if err := json.Unmarshal(data, &mate); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/third/s3.go:263�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 255�[0m (govet)
	if err := checkUploadName(ctx, mate.Name); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/third/third.go:59�[0m:8: �[31mshadow: declaration of "err" shadows declaration at line 43�[0m (govet)
	if _, err := url.Parse(config.Config.Object.ApiURL); err != nil {
	      �[33m^�[0m
�[1minternal/rpc/user/user.go:125�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 119�[0m (govet)
	if err := CallbackBeforeUpdateUserInfo(ctx, req); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/user/user.go:129�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 119�[0m (govet)
	if err := s.UpdateByMap(ctx, req.UserInfo.UserID, data); err != nil {
	   �[33m^�[0m
�[1minternal/rpc/user/user.go:198�[0m:56: �[31mError return value of `s.friendNotificationSender.UserInfoUpdatedNotification` is not checked�[0m (errcheck)
	s.friendNotificationSender.UserInfoUpdatedNotification(ctx, req.UserID)
	                                                      �[33m^�[0m
�[1minternal/rpc/user/user.go:361�[0m:56: �[31mError return value of `s.userNotificationSender.UserStatusChangeNotification` is not checked�[0m (errcheck)
		s.userNotificationSender.UserStatusChangeNotification(ctx, tips)
		                                                     �[33m^�[0m
�[1mpkg/common/cmd/msg_utils.go:25�[0m:2: �[31mfield `msgTool` is unused�[0m (unused)
	msgTool *tools.MsgTool
	�[33m^�[0m
�[1mpkg/common/cmd/msg_utils.go:41�[0m:23: �[31mfunc `(*MsgUtilsCmd).getFixAllFlag` is unused�[0m (unused)
func (m *MsgUtilsCmd) getFixAllFlag(cmdLines *cobra.Command) bool {
                      �[33m^�[0m
�[1mpkg/common/cmd/msg_utils.go:50�[0m:23: �[31mfunc `(*MsgUtilsCmd).getClearAllFlag` is unused�[0m (unused)
func (m *MsgUtilsCmd) getClearAllFlag(cmdLines *cobra.Command) bool {
                      �[33m^�[0m
�[1mpkg/common/cmd/msg_utils.go:68�[0m:23: �[31mfunc `(*MsgUtilsCmd).getBeginSeqFlag` is unused�[0m (unused)
func (m *MsgUtilsCmd) getBeginSeqFlag(cmdLines *cobra.Command) int64 {
                      �[33m^�[0m
�[1mpkg/common/cmd/msg_utils.go:77�[0m:23: �[31mfunc `(*MsgUtilsCmd).getLimitFlag` is unused�[0m (unused)
func (m *MsgUtilsCmd) getLimitFlag(cmdLines *cobra.Command) int64 {
                      �[33m^�[0m
�[1mpkg/common/convert/friend.go:29�[0m:24: �[31mError return value of `utils.CopyStructFields` is not checked�[0m (errcheck)
	utils.CopyStructFields(dbFriend, friend)
	                      �[33m^�[0m
�[1mpkg/common/convert/friend.go:72�[0m:25: �[31mError return value of `utils.CopyStructFields` is not checked�[0m (errcheck)
		utils.CopyStructFields(friendPb, friend)
		                      �[33m^�[0m
�[1mpkg/common/db/cache/conversation.go:223�[0m:34: �[31mfunc `(*ConversationRedisCache).getConversationIndex` is unused�[0m (unused)
func (c *ConversationRedisCache) getConversationIndex(convsation *relationtb.ConversationModel, keys []string) (int, error) {
                                 �[33m^�[0m
�[1mpkg/common/db/cache/conversation.go:336�[0m:34: �[31mfunc `(*ConversationRedisCache).getUserAllHasReadSeqsIndex` is unused�[0m (unused)
func (c *ConversationRedisCache) getUserAllHasReadSeqsIndex(conversationID string, conversationIDs []string) (int, error) {
                                 �[33m^�[0m
�[1mpkg/common/db/controller/auth.go:72�[0m:3: �[31mshadow: declaration of "err" shadows declaration at line 60�[0m (govet)
		err := a.cache.DeleteTokenByUidPid(ctx, userID, platformID, deleteTokenKey)
		�[33m^�[0m
�[1mpkg/common/db/controller/conversation.go:108�[0m:7: �[31mshadow: declaration of "err" shadows declaration at line 83�[0m (govet)
			if err := utils.CopyStructFields(temp, conversation); err != nil {
			   �[33m^�[0m
�[1mpkg/common/db/controller/msg.go:838�[0m:7: �[31mshadow: declaration of "err" shadows declaration at line 804�[0m (govet)
			if err := db.msgDocDatabase.DeleteMsgsInOneDocByIndex(ctx, msgDocModel.DocID, delMsgIndexs); err != nil {
			   �[33m^�[0m
�[1mpkg/common/db/s3/cont/controller.go:109�[0m:15: �[31mS1028: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...))�[0m (gosimple)
		return nil, errors.New(fmt.Sprintf("too many parts: %d", partNumber))
		            �[33m^�[0m
�[1mpkg/common/db/s3/cos/cos.go:55�[0m:2: �[31mconst `videoSnapshotImagePng` is unused�[0m (unused)
	videoSnapshotImagePng = "png"
	�[33m^�[0m
�[1mpkg/common/db/s3/cos/cos.go:56�[0m:2: �[31mconst `videoSnapshotImageJpg` is unused�[0m (unused)
	videoSnapshotImageJpg = "jpg"
	�[33m^�[0m
�[1mpkg/common/db/s3/minio/minio.go:143�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 138�[0m (govet)
		if err := m.core.Client.MakeBucket(ctx, conf.Bucket, minio.MakeBucketOptions{}); err != nil {
		   �[33m^�[0m
�[1mpkg/common/db/s3/minio/minio.go:152�[0m:6: �[31mshadow: declaration of "err" shadows declaration at line 138�[0m (govet)
		if err := m.core.Client.SetBucketPolicy(ctx, conf.Bucket, policy); err != nil {
		   �[33m^�[0m
�[1mpkg/common/db/s3/minio/thumbnail.go:85�[0m:12: �[31mshadow: declaration of "err" shadows declaration at line 41�[0m (govet)
			reader, err := m.core.Client.GetObject(ctx, m.bucket, name, minio.GetObjectOptions{})
			        �[33m^�[0m
�[1mpkg/common/db/s3/minio/thumbnail.go:106�[0m:9: �[31mshadow: declaration of "err" shadows declaration at line 41�[0m (govet)
		if _, err := m.core.Client.PutObject(ctx, m.bucket, cacheKey, buf, int64(buf.Len()), minio.PutObjectOptions{}); err != nil {
		      �[33m^�[0m
�[1mpkg/common/db/s3/oss/oss.go:56�[0m:2: �[31mconst `videoSnapshotImagePng` is unused�[0m (unused)
	videoSnapshotImagePng = "png"
	�[33m^�[0m
�[1mpkg/common/db/s3/oss/oss.go:57�[0m:2: �[31mconst `videoSnapshotImageJpg` is unused�[0m (unused)
	videoSnapshotImageJpg = "jpg"
	�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:251�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$match", bson.D{
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:252�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"doc_id", docID},
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:256�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$project", bson.D{
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:257�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"_id", 0},
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:258�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"doc_id", 1},
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:259�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"msgs", bson.D{
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:260�[0m:6: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
					{"$map", bson.D{
					�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:261�[0m:7: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
						{"input", indexs},
						�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:262�[0m:7: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
						{"as", "index"},
						�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:263�[0m:7: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
						{"in", bson.D{
						�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:264�[0m:8: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
							{"$let", bson.D{
							�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:265�[0m:9: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
								{"vars", bson.D{
								�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:266�[0m:10: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
									{"currentMsg", bson.D{
									�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:267�[0m:11: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
										{"$arrayElemAt", []string{"$msgs", "$$index"}},
										�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:270�[0m:9: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
								{"in", bson.D{
								�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:271�[0m:10: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
									{"$cond", bson.D{
									�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:272�[0m:11: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
										{"if", bson.D{
										�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:273�[0m:12: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
											{"$in", []string{userID, "$$currentMsg.del_list"}},
											�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:275�[0m:11: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
										{"then", nil},
										�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:276�[0m:11: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
										{"else", "$$currentMsg"},
										�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:286�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$project", bson.D{
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:287�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"msgs.del_list", 0},
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:804�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 571�[0m (govet)
	if err := cur.All(ctx, &result); err != nil {
	   �[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1053�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 831�[0m (govet)
	if err := cur.All(ctx, &result); err != nil {
	   �[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1125�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$match", bson.D{
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1126�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1132�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$project", bson.D{
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1133�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1135�[0m:7: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
						{
						�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1137�[0m:9: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
								{"input", "$msgs"},
								�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1138�[0m:9: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
								{"as", "item"},
								�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1139�[0m:9: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
								{
								�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1141�[0m:11: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
										{"$and", condition},
										�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1148�[0m:5: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
				{"doc_id", 1},
				�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1152�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$unwind", bson.M{"path": "$msgs"}},
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg.go:1155�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
			{"$sort", bson.M{"msgs.msg.send_time": -1}},
			�[33m^�[0m
�[1mpkg/common/db/unrelation/msg_convert.go:47�[0m:10: �[31mshadow: declaration of "err" shadows declaration at line 31�[0m (govet)
			if _, err := m.MsgCollection.DeleteMany(ctx, bson.M{"doc_id": regex}); err != nil {
			      �[33m^�[0m
�[1mpkg/common/db/unrelation/user.go:54�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
		{{"$match", bson.D{{"user_id", SubscriptionPrefix + userID}}}},
		 �[33m^�[0m
�[1mpkg/common/db/unrelation/user.go:55�[0m:4: �[31mcomposites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields�[0m (govet)
		{{"$project", bson.D{{"count", bson.D{{"$size", "$user_id_list"}}}}}},
		 �[33m^�[0m
�[1mpkg/common/db/unrelation/user.go:68�[0m:3: �[31mshadow: declaration of "err" shadows declaration at line 58�[0m (govet)
		err := cursor.Decode(&cnt)
		�[33m^�[0m
�[1mpkg/common/discoveryregister/kubernetes/kubernetes.go:177�[0m:2: �[31mS1023: redundant `return` statement�[0m (gosimple)
	return
	�[33m^�[0m
�[1mpkg/common/ginprometheus/ginprometheus.go:223�[0m:17: �[31mError return value of `p.router.Run` is not checked�[0m (errcheck)
	go p.router.Run(p.listenAddress)
	               �[33m^�[0m
�[1mpkg/common/kafka/producer.go:120�[0m:24: �[31mError return value of `compress.UnmarshalText` is not checked�[0m (errcheck)
	compress.UnmarshalText(bytes.ToLower([]byte(compressType)))
	                      �[33m^�[0m
�[1mpkg/common/tls/tls.go:33�[0m:12: �[31mSA1019: x509.DecryptPEMBlock has been deprecated since Go 1.16 because it shouldn't be used: Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.�[0m (staticcheck)
	d, err := x509.DecryptPEMBlock(b, passphrase)
	          �[33m^�[0m
�[1mpkg/rpcclient/notification/friend.go:112�[0m:36: �[31mfunc `(*FriendNotificationSender).getFromToUserNickname` is unused�[0m (unused)
func (f *FriendNotificationSender) getFromToUserNickname(
                                   �[33m^�[0m
�[1mpkg/rpcclient/notification/friend.go:217�[0m:16: �[31mError return value of `f.Notification` is not checked�[0m (errcheck)
	f.Notification(ctx, req.OwnerUserID, req.BlackUserID, constant.BlackDeletedNotification, &blackDeletedTips)
	              �[33m^�[0m
�[1mpkg/rpcclient/notification/friend.go:226�[0m:16: �[31mError return value of `f.Notification` is not checked�[0m (errcheck)
	f.Notification(ctx, mcontext.GetOpUserID(ctx), needNotifiedUserID, constant.FriendInfoUpdatedNotification, &tips)
	              �[33m^�[0m
�[1mpkg/rpcclient/notification/group.go:195�[0m:35: �[31mfunc `(*GroupNotificationSender).groupDB2PB` is unused�[0m (unused)
func (g *GroupNotificationSender) groupDB2PB(group *relation.GroupModel, ownerUserID string, memberCount uint32) *sdkws.GroupInfo {
                                  �[33m^�[0m
�[1mpkg/rpcclient/notification/group.go:234�[0m:35: �[31mfunc `(*GroupNotificationSender).getUsersInfoMap` is unused�[0m (unused)
func (g *GroupNotificationSender) getUsersInfoMap(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error) {
                                  �[33m^�[0m
�[1mpkg/rpcclient/notification/group.go:269�[0m:12: �[31mshadow: declaration of "err" shadows declaration at line 246�[0m (govet)
			member, err := g.db.TakeGroupMember(ctx, groupID, userID)
			        �[33m^�[0m
�[1mpkg/rpcclient/notification/group.go:413�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 397�[0m (govet)
	if err := g.fillOpUser(ctx, &tips.OpUser, tips.Group.GroupID); err != nil {
	   �[33m^�[0m
�[1mpkg/rpcclient/notification/group.go:441�[0m:5: �[31mshadow: declaration of "err" shadows declaration at line 425�[0m (govet)
	if err := g.fillOpUser(ctx, &tips.OpUser, tips.Group.GroupID); err != nil {
	   �[33m^�[0m
�[1mpkg/rpcclient/notification/user.go:74�[0m:34: �[31mfunc `(*UserNotificationSender).getUsersInfoMap` is unused�[0m (unused)
func (u *UserNotificationSender) getUsersInfoMap(
                                 �[33m^�[0m
�[1mpkg/rpcclient/notification/user.go:89�[0m:34: �[31mfunc `(*UserNotificationSender).getFromToUserNickname` is unused�[0m (unused)
func (u *UserNotificationSender) getFromToUserNickname(
                                 �[33m^�[0m
�[1mpkg/rpcclient/third.go:45�[0m:2: �[31mSA4006: this value of `err` is never used�[0m (staticcheck)
	minioClient, err := minioInit()
	�[33m^�[0m
�[1mpkg/rpcclient/third.go:51�[0m:2: �[31mS1021: should merge variable declaration with assignment on next line�[0m (gosimple)
	var initUrl string
	�[33m^�[0m
�[1mpkg/statistics/statistics.go:39�[0m:3: �[31mS1000: should use a simple channel send/receive instead of `select` with a single case�[0m (gosimple)
		select {
		�[33m^�[0m
�[1mtest/e2e/api/token/token.go:61�[0m:6: �[31mfunc `main` is unused�[0m (unused)
func main() {
     �[33m^�[0m
�[1mtest/e2e/framework/helpers/chat/chat.go:102�[0m:6: �[31mfunc `getLatestVersion` is unused�[0m (unused)
func getLatestVersion(url string) (string, error) {
     �[33m^�[0m
make[1]: *** [scripts/make-rules/golang.mk:189: go.lint] Error 1
make: *** [Makefile:152: lint] Error 2
##[error]Process completed with exit code 2.
##[group]Run github/codeql-action/analyze@v2
with:
  output: ../results
  upload: always
  cleanup-level: brutal
  add-snippets: false
  skip-queries: false
  checkout_path: /home/runner/work/open-im-server/open-im-server
  upload-database: true
  wait-for-processing: true
  token: ***
  matrix: null
  expect-error: false
##[endgroup]
RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/github/codeql-action/v2/node_modules/@octokit/request/dist-node/index.js:86:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async requestWithGraphqlErrorHandling (/home/runner/work/_actions/github/codeql-action/v2/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
    at async Job.doExecute (/home/runner/work/_actions/github/codeql-action/v2/node_modules/bottleneck/light.js:405:18) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/openimsdk/open-im-server/code-scanning/analysis/status',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Thu, 04 Jan 2024 12:54:58 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'E0DA:6DC2:BBAA68:C37DD5:6596AAA1',
      'x-ratelimit-limit': '1000',
      'x-ratelimit-remaining': '942',
      'x-ratelimit-reset': '1704375957',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '58',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest'
    }
  },
  request: {
    method: 'PUT',
    url: 'https://api.github.com/repos/openimsdk/open-im-server/code-scanning/analysis/status',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'CodeQL-Action/2.22.12 octokit-core.js/3.6.0 Node.js/16.20.2 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"action_name":"finish","action_oid":"unknown","action_ref":"v2","action_started_at":"2024-01-04T12:54:57.270Z","action_version":"2.22.12","analysis_key":".github/workflows/pull-request.yml:build","commit_oid":"e0244d9ca7e8a7d8728bb915d094b11e7f8226f5","job_name":"build","job_run_uuid":"","ref":"refs/heads/main","runner_available_disk_space_bytes":24788819968,"runner_os":"Linux","runner_total_disk_space_bytes":89297309696,"started_at":"2024-01-04T12:54:57.270Z","status":"starting","testing_environment":"","workflow_name":"Github Pull Request","workflow_run_attempt":1,"workflow_run_id":7409742107,"matrix_vars":"null","runner_arch":"X64","runner_image_version":"20231217.2.0"}',
    request: { agent: [Agent], hook: [Function: bound bound register] }
  }
}
##[error]Resource not accessible by integration
##[group]Run make generate
�[36;1mmake generate�[0m
�[36;1mecho "Generate all necessary files successfully" �[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
make: *** No rule to make target 'generate'.  Stop.
##[error]Process completed with exit code 2.

Here are the logs:
===========> Verifying go-junit-report is installed
===========> Installing The default installation path is /home/runner/work/open-im-server/open-im-server/_output/tools/go-junit-report
github.com/jstemmer/go-junit-report: go install github.com/jstemmer/go-junit-report: copying /tmp/go-build2092227650/b001/exe/a.out: open /home/runner/work/open-im-server/open-im-server/_output/tools/go-junit-report: permission denied
make[3]: *** [scripts/make-rules/tools.mk:102: install.go-junit-report] Error 1
make[2]: *** [scripts/make-rules/tools.mk:49: tools.install.go-junit-report] Error 2
make[1]: *** [scripts/make-rules/tools.mk:61: tools.verify.go-junit-report] Error 2
make: *** [Makefile:167: cover] Error 2

[!CAUTION]

An error has occurred: Message is too long, max tokens is -7278 (tracking ID: 7315ec65dc)

@cubxxw cubxxw enabled auto-merge January 4, 2024 12:56
@cubxxw cubxxw merged commit 7e2c535 into release-v3.5 Jan 4, 2024
46 of 50 checks passed
@openimsdk openimsdk locked and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants