3 ms·
But for those you can do a manual bounds & pointer check.
by d0100 8y ago
But for those you can do a manual bounds & pointer check.
- skj 8y agoYour code is allowed to panic if there is a bug. For instance, the caller passed in a nil pointer where there needed to be actual data. Errors are for when the input (specifically the I/O) is wrong, a precondition isn't met, or some other error that doesn't mean there is something fundamentally wrong with your code. If to make the problem go away you need to fix the code, panic is OK.