Settings

Theme

Lumber: The logging package to kill if err = nil

github.com

5 points by Matt-Gleich 5 years ago · 2 comments

Reader

geoah 5 years ago

Interesting idea, thank you for sharing it and for a very nice readme. The package as a logger seems easy to use and with a very pretty output which I do appreciate.

I’m not so sure about how well it does in reducing `if err != nil`. Most production systems in my experience will check for the error, log it, and return. Emphasis on return. Even cli tools will return the error to let some form of higher caller to handle the reporting. And almost never you’ll see non main packages fatal.

The hook methods are interesting as well but they are more cumbersome than an if and much harder to look at imo.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection