All errors must be handled
As a novice developer, I hated error handling:
- takes ages
- boring
- these things might never happen
Obviously this is a bad attitude, things can and do go wrong.
In Go, you can't throw exceptions, errors are variables, so lots of code like this:
- function returns err, since you can't have unused variables, if the error isn't nil, you must handle it.
This is great - forces you to consider error handling as you go, not an afterthought