Skip to content

Commit

Permalink
using new function name in life cycle methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mativm02 committed May 22, 2023
1 parent 4e08cc6 commit cbc5e70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion persistent/internal/driver/mgo/life_cycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type lifeCycle struct {

// Connect connects to the mongo database given the ClientOpts.
func (lc *lifeCycle) Connect(opts *types.ClientOpts) error {
opts.ConnectionString = helper.ParsePassword(opts.ConnectionString)
opts.ConnectionString = helper.EncodeConnectionString(opts.ConnectionString)

dialInfo, err := mgo.ParseURL(opts.ConnectionString)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion persistent/internal/driver/mongo/life_cycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (lc *lifeCycle) Connect(opts *types.ClientOpts) error {
var err error
var client *mongo.Client

opts.ConnectionString = helper.ParsePassword(opts.ConnectionString)
opts.ConnectionString = helper.EncodeConnectionString(opts.ConnectionString)

// we check if the connection string is valid before building the connOpts.
cs, err := connstring.ParseAndValidate(opts.ConnectionString)
Expand Down

0 comments on commit cbc5e70

Please sign in to comment.