Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

feat: add mongo_uri config option#338

Closed
rickbassham wants to merge 1 commit intoiegomez:masterfrom
rickbassham:master
Closed

feat: add mongo_uri config option#338
rickbassham wants to merge 1 commit intoiegomez:masterfrom
rickbassham:master

Conversation

@rickbassham
Copy link

@rickbassham rickbassham commented Sep 22, 2024

Adds a new mongo_uri config option to specify the entire mongo uri. This allows for more complex connection strings.

Copy link
Owner

@iegomez iegomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for the change?

var addr string

if mongoUri, ok := authOpts["mongo_uri"]; ok {
addr = mongoUri
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some standard validation to run against the uri?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing mongo.Connect method will validate it and return an appropriate error if the URI is bad.

@iegomez
Copy link
Owner

iegomez commented Oct 18, 2024

@rickbassham let me know if you plan on adding that test I mentioned.

@iegomez iegomez closed this Jun 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments