6 ms·
Just do foo, err := doThing(bar) if err != nil { // ... } and carry on with your life. Go is not a language in which you obsess over small
by q3k 6y ago
Just do
foo, err := doThing(bar)
if err != nil {
// ...
}
and carry on with your life. Go is not a language in which you obsess over small things like these.
- dunefox 6y agoSo Go is a language that values the compiler writer over the programmer?
- fredrikholm 6y agoThe difference between those two blocks is that a semi-colon was replaced with a new line. _How insulting_.
- DangitBobby 6y agoIt's okay to be annoyed by patterns you don't like!
- unionpivo 6y agoIt's very opiniated language. And to be fair, I prefer to do this in 2 lines, since it's simpler to read (less going on in each line.)
- youerbt 6y agoThe corporation over the programmer.
- isaiahg 6y agoI was thinking that as I was reading. Its 1 extra new line, and arguably more readable.