-
Notifications
You must be signed in to change notification settings - Fork 32
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
ISSUE#31 Fixed panic on nil ptr #32
Conversation
thanks! |
I think the slice case should be removed because a nil slice is effectively an empty slice. |
hmm, you're right. same for the map actually. |
Sure, I'll do that right away. |
While writing tests, I'm getting a fail on the map part. Here is the test result:
There is a test that expects https://github.com/liip/sheriff/blob/master/sheriff_test.go#L493 |
If keeping existing behavior is desired, I would suggest only removing |
The interesting thing about this is that |
In codebases using this library, this can be fixed/worked around by changing
to
|
hmm not sure what to do here TBH.
|
The initial issue was only for nil pointer and then the PR extended into other types too. |
The difference between the two is that
The failing test is not fixable on its own, so I created another branch with only Should I open a PR for that one? |
yeah, let's do that. |
Pull request related to #31