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: do not panic on nil object #21

Merged
merged 1 commit into from
Feb 11, 2023
Merged

fix: do not panic on nil object #21

merged 1 commit into from
Feb 11, 2023

Conversation

SVilgelm
Copy link
Contributor

fix #20 for the panic on json.Marshal(nil) code

fix go-simpler#20 for the panic on `json.Marshal(nil)` code
@codecov-commenter
Copy link

Codecov Report

Merging #21 (76108a1) into main (27a84af) will increase coverage by 0.11%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   95.23%   95.34%   +0.11%     
==========================================
  Files           1        1              
  Lines         126      129       +3     
==========================================
+ Hits          120      123       +3     
  Misses          4        4              
  Partials        2        2              
Impacted Files Coverage Δ
musttag.go 95.34% <100.00%> (+0.11%) ⬆️

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

@tmzane tmzane self-requested a review February 11, 2023 23:08
@tmzane tmzane changed the title do not panic on nil object fix: do not panic on nil object Feb 11, 2023
@tmzane
Copy link
Member

tmzane commented Feb 11, 2023

I've also found out that arg.Obj may be nil if the argument is a global variable defined in a separate file 🤔. I'll fix that in a separate PR.

@tmzane tmzane merged commit 2ad105d into go-simpler:main Feb 11, 2023
@SVilgelm
Copy link
Contributor Author

I've also found out that arg.Obj may be nil if the argument is a global variable defined in a separate file 🤔. I'll fix that in a separate PR.

Oh, cool that you found it. I will test the linter on our code. Thank you for your work

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.

panic: runtime error: invalid memory address or nil pointer dereference
3 participants