fix 细节 (#2525)

1、统一结构体方法 receiver,都用 pointer
2、使用 errors.Is 来做错误判断
3、修复单词拼写的错误
This commit is contained in:
Mew151
2024-08-21 11:44:00 +08:00
committed by GitHub
parent 7f6b4da8eb
commit 1022b297d4
9 changed files with 35 additions and 33 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ package msgtransfer
import (
"context"
"errors"
"fmt"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/cache/redis"
@@ -137,7 +138,7 @@ func (m *MsgTransfer) Start(index int, config *Config) error {
return
}
if err := prommetrics.TransferInit(prometheusPort); err != nil && err != http.ErrServerClosed {
if err := prommetrics.TransferInit(prometheusPort); err != nil && !errors.Is(err, http.ErrServerClosed) {
netErr = errs.WrapMsg(err, "prometheus start error", "prometheusPort", prometheusPort)
netDone <- struct{}{}
}