Currenltly, error handling is done in the usual pattern of
err := something()
if err != nil {
return err // propagate err up the function call chain
}
However, this might not be the most robust and efficient way to do this as mentioned in this super interesting talk.
The main take away from this are that the current versions of Go pass return values around in memory rather than in registers as done by languages like C++. An excellent reference for the same can be found here. Therefore, doing error handling in the above mentioned form may not prove to be as efficient as one might like.
Some discussion might be required in terms of what approaches to use and if we should introduce external dependencies to handle the same, before proceeding with this issue in. Discussion can take place on the Discussions tab.
Currenltly, error handling is done in the usual pattern of
However, this might not be the most robust and efficient way to do this as mentioned in this super interesting talk.
The main take away from this are that the current versions of Go pass return values around in memory rather than in registers as done by languages like C++. An excellent reference for the same can be found here. Therefore, doing error handling in the above mentioned form may not prove to be as efficient as one might like.
Some discussion might be required in terms of what approaches to use and if we should introduce external dependencies to handle the same, before proceeding with this issue in. Discussion can take place on the Discussions tab.