mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
feat: set openim lint
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
parent
f9623807fb
commit
9e4779d76d
@ -156,18 +156,13 @@ func checkMongo() (string, error) {
|
||||
}
|
||||
defer client.Disconnect(context.Background())
|
||||
|
||||
if err = client.Ping(context.TODO(), nil); err != nil {
|
||||
return "", errs.Wrap(errStr(err, str))
|
||||
}
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), mongoConnTimeout)
|
||||
defer cancel()
|
||||
|
||||
if err = client.Ping(ctx, nil); err != nil {
|
||||
return "", err // Handle the error as needed
|
||||
return "", errs.Wrap(errStr(err, str))
|
||||
}
|
||||
|
||||
str := "The addr is: " + strings.Join(config.Config.Mongo.Address, ",")
|
||||
return str, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user