nil
check in type assertion SCC-S1020There is no need to check for nil
when performing type assertion as it is
implicitly handled. When false
, the second value returned confirms that the
value of the asserted type is nil
.
if _, ok := i.(T); ok && i != nil {}
if _, ok := i.(T); ok {}