-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add LoadMap #13
Add LoadMap #13
Conversation
I'm a bit confused, can you please explain why we need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -113,7 +113,7 @@ func (p *lineParser) parse(envVars *EnvVars, l string) error { | |||
|
|||
// key is first index, value is second | |||
k := strings.TrimSpace(splits[0]) | |||
v := strings.TrimSpace(splits[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to affect multi line strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this test fail if it did? https://github.com/wingocard/serum/blob/master/internal/envparser/envparser_test.go#L128
It is slightly redundant in the sense that the original map will have plain text values in it as well. It keeps the API consistent in the sense that it also loads the plain text values into the environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💌
Closing this in favour of #14 |
This adds functionality to load env vars and decrypt them from an in memory map.
It removes trimming space from values.