|
|
|
@ -72,7 +72,7 @@ func init() {
|
|
|
|
|
// clientOpts := options.Client().ApplyURI("mongodb://localhost:27017,localhost:27018/?replicaSet=replset")
|
|
|
|
|
//mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
|
|
|
|
|
//uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d&authSource=admin&replicaSet=replset",
|
|
|
|
|
uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d&authSource=admin",
|
|
|
|
|
uri = fmt.Sprintf("mongodb://%s:%s@%s/%s?maxPoolSize=%d&authSource=admin&replicaSet=replset",
|
|
|
|
|
config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, mongodbHosts,
|
|
|
|
|
config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize)
|
|
|
|
|
} else {
|
|
|
|
|