Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[config.go] Add GetConnectionURL #108

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

Merged
merged 2 commits into from
May 21, 2023

Conversation

SamuelMarks
Copy link
Contributor

I'm assuming something like this; although maybe it'd be better to listen on a socket / named-pipe rather than use all this port and localhost stuff? - Anyway it's a start…

@fergusstrange
Copy link
Owner

Hey, thanks for this, quite a neat idea.

On digging a little further there are a bunch of different variations that are going to be dependant on the user. For this reason I think it may be better to leave this for users to construct themselves.

@SamuelMarks
Copy link
Contributor Author

@fergusstrange Actually all those variants are variants of the same. Considering you limit what can be provided as config this syntax that I've posted is the one that makes sense.

In terms of leaving it up to the users, I haven't touched Go in a long while, how do I access the config struct private members from outside the package?

@fergusstrange
Copy link
Owner

That's a good point. I'd forgotten we closed off access to the Config struct.

Your proposed solution is nice and simple, and does the job. If you can add some test coverage and ensure you're not dropping the code coverage then let's see if we can get this merged.

Cheers

@fergusstrange fergusstrange reopened this Mar 21, 2023
@SamuelMarks
Copy link
Contributor Author

Added a test; not sure if there's some configuration missing to make it run with all the others

Copy link

@alifarooq0 alifarooq0 left a comment

Choose a reason for hiding this comment

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

This is very helpful. 👍

@SamuelMarks
Copy link
Contributor Author

Thanks @alifarooq0

FYI: Because of lack of progress on this PR I ended up just extracting what I need from this repo into my project https://github.com/offscale/postgres-version-manager-go - happy to proffer changes you want back to you

@alifarooq0
Copy link

Hey @fergusstrange is there anything outstanding for this PR? It'd be great to get this in.

@fergusstrange
Copy link
Owner

Apologies all on the slow progress here. I'm merging this in now and will release shortly 👍

@fergusstrange fergusstrange merged commit cd07cf7 into fergusstrange:master May 21, 2023
emidoots pushed a commit to sourcegraph/embedded-postgres that referenced this pull request May 25, 2023
* [config.go] Add `GetConnectionURL`

* [test_config.go] Add basic test for `GetConnectionURL`
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.

3 participants