3 ms·
That's what the underscore is for, explicit ignore. And it's a huge code smell. You instantly notice it because the if err != nil -template is missing after it
by theshrike79 5y ago
That's what the underscore is for, explicit ignore. And it's a huge code smell.
You instantly notice it because the if err != nil -template is missing after it =)
- int_19h 5y agoSorry, I didn't word that well. What I meant is that you can ignore the returned value altogether, including the error. https://github.com/golang/go/issues/20803 https://github.com/golang/go/issues/20803 In contrast, e.g. Zig requires you to use _ if you want to ignore.