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 check for blank env key #153

Merged
merged 3 commits into from Feb 1, 2021
Merged

Add check for blank env key #153

merged 3 commits into from Feb 1, 2021

Conversation

xkisu
Copy link
Contributor

@xkisu xkisu commented Jan 31, 2021

This adds a check (and corresponding test) to prevent rogue blank env keys in the environment from producing unexpected results on fields without env tags, as per #152 .

Fixes rouge blank env keys in the environment having unexpected results #152
Test for rogue blank env key fix for #152
env.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 31, 2021

Codecov Report

Merging #153 (d27b974) into master (aa84092) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   98.31%   98.34%   +0.02%     
==========================================
  Files           1        1              
  Lines         237      241       +4     
==========================================
+ Hits          233      237       +4     
  Misses          2        2              
  Partials        2        2              
Impacted Files Coverage Δ
env.go 98.34% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa84092...d27b974. Read the comment docs.

env.go Outdated Show resolved Hide resolved
@caarlos0
Copy link
Owner

caarlos0 commented Feb 1, 2021

Thanks

@caarlos0 caarlos0 merged commit 2ed4d36 into caarlos0:master Feb 1, 2021
nexoscp added a commit to nexoscp/env that referenced this pull request Apr 7, 2022
* Added blank key check

Fixes rouge blank env keys in the environment having unexpected results caarlos0#152

* Added test for blank env key

Test for rogue blank env key fix for caarlos0#152

* refactor: else

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants