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

Add LoadMap #13

Closed
wants to merge 5 commits into from
Closed

Add LoadMap #13

wants to merge 5 commits into from

Conversation

hebime
Copy link
Contributor

@hebime hebime commented Feb 8, 2021

This adds functionality to load env vars and decrypt them from an in memory map.
It removes trimming space from values.

@hebime hebime requested review from amineck and iToto February 8, 2021 23:58
@amineck
Copy link
Contributor

amineck commented Feb 9, 2021

I'm a bit confused, can you please explain why we need ParseMap to also map Plain values as well? to keep the API stable?
Cause If we are not passing .env files, the ParseMap is only useful pull secrets, right?

Copy link
Contributor

@amineck amineck left a 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])
Copy link
Contributor

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?

Copy link
Member

Choose a reason for hiding this comment

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

@hebime
Copy link
Contributor Author

hebime commented Feb 9, 2021

I'm a bit confused, can you please explain why we need ParseMap to also map Plain values as well? to keep the API stable?
Cause If we are not passing .env files, the ParseMap is only useful pull secrets, right?

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.

Copy link
Member

@iToto iToto left a comment

Choose a reason for hiding this comment

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

💌

@hebime
Copy link
Contributor Author

hebime commented Feb 10, 2021

Closing this in favour of #14

@hebime hebime closed this Feb 10, 2021
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.

None yet

3 participants