|
|
|
|
|
by germainelong
2730 days ago
|
|
The comment claim that every branch is accounted for and yet few functions below you can see this is certainly not the case.
They should either have fixed it first and then make such comment or shouldn't make such comment at all.
Otherwise this looks a bit cringey. |
|
In particular Go (like C) has no built-in exception "throwing" / unwinding support, so for any function call where you want to pass an error onto the caller, you need to do something like
See also https://blog.golang.org/error-handling-and-go . As far as I can tell, all of the if-statements without else-clauses are doing just this.(It would be nice in theory if there were better language support for making this lexically obvious but they're in a language where that's not doable.)