Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add mongo_uri config option #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants