-
Notifications
You must be signed in to change notification settings - Fork 176
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
Use dedicated dotenv library? #5
Comments
👍 @joho. Would be great to see opensource projects collaborate to reduce duplication while increasing ability. Just in case you don't know, I did also create similar project like yours, a port of dotenv, https://github.com/subosito/gotenv, which is also fully compatible with dotenv. Would be great to see one of these ports to be merged into forego, let see @ddolllar response :). By the way, what do you think is better, is it ok to keep two similar projects exists along with others or merge into a single project? |
Do either of these libraries let me load a |
Not at this stage, but I could add a godotenv.Read() that returns instead of doing os.Setenv on everything On Wednesday, 4 September 2013 at 11:49 AM, David Dollar wrote:
|
I think that would be necessary to add it cleanly to forego. If you want to either create that Read method or even better submit a pull request to forego that would be awesome. |
Gotenv have support for that. You can using // import "strings"
pairs := gotenv.Parse(strings.NewReader("FOO=test\nBAR=$FOO"))
// gotenv.Env{"FOO": "test", "BAR": "test"}
pairs = gotenv.Parse(strings.NewReader(`FOO="bar"`))
// gotenv.Env{"FOO": "bar"} |
@subosito Perfect, I switched forego to use gotenv. Thanks! |
You're welcome @ddollar 👍 |
Hi @ddollar,
I've got a go dotenv port at https://github.com/joho/godotenv which might be worth integrating to make forego and foreman closer to 100% compatible. I'd ported all the tests from the ruby dotenv library to ensure compatibility.
I'm happy to do a pull request if you want to use the library, just thought it'd be polite to ask first incase you wanted to do the .env handling yourself.
The text was updated successfully, but these errors were encountered: