awalterschulze / goderive

Derives and generates mundane golang functions that you do not want to maintain yourself
Apache License 2.0
1.24k stars 43 forks source link

add missing nil checking in test file #64

Closed jbl428 closed 3 years ago

jbl428 commented 3 years ago

During CI, test step have occasionally failed with nil pointer dereference panic.

(Ex: https://github.com/jbl428/goderive/runs/2809167722?check_suite_focus=true)

I have found that the random function sometimes returns nil when pointer type is given and some test codes does not handle nil case.

awalterschulze commented 3 years ago

Thank you, great fix <3