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
We should fix this. I haven't decided on the best solution yet. The current implementation is based on types only. And while we certainly could detect some problematic values, we'll never be fully free of false positives. Maybe you slice in one function, then pass the slices to another function that does the check…
This is where it'd be useful to have statistics, namely how often the check matches correctly. Is it even worth having?
staticcheck doesn't like to following function:
It complains:
use net.IP.Equal to compare net.IPs, not bytes.Equal (SA1021)
.This would be reasonable thing to do when using
bytes.Equal(a, b)
, but not when using sub-slices ofa
andb
.The text was updated successfully, but these errors were encountered: