fix: wrap the error of group user and thrid (#2005)

* fix: wrap the error of group user and thrid

* fix: del the chinese comment

* fix: fix the make_lint error

* fix: fix the ApiTest error
This commit is contained in:
Brabem
2024-03-06 16:20:07 +08:00
committed by GitHub
parent c7dad1a5c1
commit 52b8efba73
13 changed files with 49 additions and 50 deletions
+3 -4
View File
@@ -102,12 +102,11 @@ func buildMongoURI(config *config.GlobalConfig) string {
maxPoolSize = fmt.Sprint(config.Mongo.MaxPoolSize)
}
uriFormat := "mongodb://%s/%s?maxPoolSize=%s"
if username != "" && password != "" {
uriFormat = "mongodb://%s:%s@%s/%s?maxPoolSize=%s"
return fmt.Sprintf(uriFormat, username, password, address, database, maxPoolSize)
return fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%s", username, password, address, database, maxPoolSize)
}
return fmt.Sprintf(uriFormat, address, database, maxPoolSize)
return fmt.Sprintf("mongodb://%s/%s?maxPoolSize=%s", address, database, maxPoolSize)
}
func shouldRetry(err error) bool {