4 ms·
The `else if` is useless here, since you return anyway. It only adds noise. I rarely use the one-line `if err := ...; err !=nil ` idiom because its quite a mo
by AYBABTME 13y ago
The `else if` is useless here, since you return anyway. It only adds noise.
I rarely use the one-line `if err := ...; err !=nil ` idiom because its quite a mouthful. However when I do, I try to make sure it's not too much to grasp at once. Here the extra `else` goes against that.
Alright, I know this is just a quick snippet on HN and all, I just thought I'd mention it anyways. Maybe next time you actually write that in code you'll think about my point. ;)