2 ms·
Runtime assertions without defensive checks are programmer errors that are not difficult to spot in code review and should not be expected to make it to deploye
by preseinger 4y ago
Runtime assertions without defensive checks are programmer errors that are not difficult to spot in code review and should not be expected to make it to deployed code.
// RED FLAG
x := y.(type)
// good
x, ok := y.(type)
if !ok { return an error }