You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The code handles nil ptrs and other complex stuff well but there is one bug that happens if the value of the instance passed to maskDetails is nil. Of course it is silly to pass nil but sometimes the caller might now know (I hit this on an interceptor on a use case where one object was nil)
The original masker code that this was inspired from does handle that case right away
Expected behavior
This seems like a gray are because it is an error to pass a nil, so either change MaskDetails to pass an error or, if nil is passed, just return nil?
The text was updated successfully, but these errors were encountered:
eleduardo
added a commit
to eleduardo/golang-masking-tool
that referenced
this issue
Mar 3, 2023
Describe the bug
The code handles nil ptrs and other complex stuff well but there is one bug that happens if the value of the instance passed to maskDetails is nil. Of course it is silly to pass nil but sometimes the caller might now know (I hit this on an interceptor on a use case where one object was nil)
The original masker code that this was inspired from does handle that case right away
https://github.com/ggwhite/go-masker/blob/master/masker.go#L111-L113
To Reproduce
Very simple, just
Expected behavior
This seems like a gray are because it is an error to pass a nil, so either change MaskDetails to pass an error or, if nil is passed, just return nil?
The text was updated successfully, but these errors were encountered: