3 ms·
Or worse. Some library developer decided that "panic()" was the way to go rather than: return nil, err I'm fine with error values or Pythonesque exception
by bb88 3y ago
Or worse. Some library developer decided that "panic()" was the way to go rather than:
return nil, err
I'm fine with error values or Pythonesque exceptions, just not both combined.
So much of my code is typically:
result, err := someFunc()
if err != nil {
return nil, err
}
Most error conditions are basically unrecoverable anyway.