|
|
|
|
|
by cpfohl
3289 days ago
|
|
Disclaimer: Not a go apologist, I admire it, but don't use it. With Go you get a compiler error if you don't do something with that error. You have to explicitly decide to ignore it with `_`. As far as I remember that's quite different from C where you can get an error code, ignore it, and never realize you've missed it. |
|
Compare to Rust:
This will produce the following warning: This example is a bit contrived, because if you open a file you probably want to do something with it. But imagine something where the only return value you care about is the error, like say "txn.commit()"