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
A dynamic type cast like x := something(*somethingElse[]) can cause a panic. Because this can be extremely dangerous there should be a lint rule for it.
This rule should trigger if
a type ist dynamicly casted to a single value
a type is dynamicly casted and the second response value (ok) is ignored
the first result can be checked for nil - so this might be nice to configure
a dynamic type cast happens in a return statement
The alternative would be to always panic.recover() in bigger projects and just live with something as unsafe like
returnctx.Value("myCoolErrorChan").(chanerr)
The text was updated successfully, but these errors were encountered:
A dynamic type cast like
x := something(*somethingElse[])
can cause a panic. Because this can be extremely dangerous there should be a lint rule for it.This rule should trigger if
The alternative would be to always
panic.recover()
in bigger projects and just live with something as unsafe likeThe text was updated successfully, but these errors were encountered: