Skip to content

Commit

Permalink
Updating default Mongo driver to mongo-go (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
mativm02 authored Jan 31, 2024
1 parent 06f70a3 commit 9248a9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions configuration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ func LoadConfig(filePath string, conf *Configuration) {

// GetMongoDriver returns a valid mongo driver to use, it receives the
// driver set in config, and check its validity
// otherwise default to MGO
// otherwise default to mongo-go
func GetMongoDriver(driverFromConf string) string {
if driverFromConf != persistent.Mgo && driverFromConf != persistent.OfficialMongo {
return persistent.Mgo
return persistent.OfficialMongo
}
return driverFromConf
}
2 changes: 1 addition & 1 deletion configuration/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestGetMongoDriver(t *testing.T) {
{
name: "invalid driverFromConf",
driverFromConf: "invalidDriver",
expected: persistent.Mgo,
expected: persistent.OfficialMongo,
},
}

Expand Down

0 comments on commit 9248a9e

Please sign in to comment.