2 ms·
nil when you’re not expecting it. panic when there is a bug in your program; ie program not behaving as expected, all bets off. return err when expected condi
by dilap 7y ago
nil when you’re not expecting it.
panic when there is a bug in your program; ie program not behaving as expected, all bets off.
return err when expected conditions fail: bad data, service down, whatever — handle gracefully.