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

Fix non empty struct pointer value #236

Merged
merged 1 commit into from Sep 12, 2022

Conversation

akutuev
Copy link
Contributor

@akutuev akutuev commented Sep 11, 2022

This is a fix for the bug #235

I can't understand the purpose of condition !refField.IsNil() but for this use case it was considering it as non empty value (line 229), calling ParseWithFuncs (line 234) and failing due to non struct type (line 190).

I have removed it and added extra tests for that use case and all UTs are ok

@caarlos0 can you please take a look?

@codecov
Copy link

codecov bot commented Sep 11, 2022

Codecov Report

Merging #236 (47c223d) into main (69c7b5a) will increase coverage by 0.27%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main      #236      +/-   ##
===========================================
+ Coverage   99.72%   100.00%   +0.27%     
===========================================
  Files           2         2              
  Lines         358       356       -2     
===========================================
- Hits          357       356       -1     
+ Misses          1         0       -1     
Impacted Files Coverage Δ
env.go 100.00% <100.00%> (+0.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@akutuev akutuev marked this pull request as ready for review September 11, 2022 20:09
@caarlos0
Copy link
Owner

I don't remember why either, but, if all tests are passing, should be fine!

Thanks

@caarlos0 caarlos0 merged commit f3ddf1f into caarlos0:main Sep 12, 2022
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

2 participants