decred / dcrdevdocs

Decred Development Documentation
https://devdocs.decred.org
ISC License
5 stars 11 forks source link

Go error handling best practices #94

Open xaur opened 3 years ago

xaur commented 3 years ago

https://github.com/decred/dcrd/issues/2181 captures Go error handling best practices accumulated from years of experience and discussions. This looks like valuable knowledge to start collecting in the dev docs. It would also be more safe in the devdocs repo, compared to GitHub issues (that are currently not archived by anyone afaik). As a small bonus, it would make for more "good tech read" pages available offline via Git.

xaur commented 3 years ago

Having coding best practices (Decred specific and linked externally) in one place would also simplify developer onboarding.

jholdstock commented 3 years ago

Great idea. Considering the amount of Go code we have in the Decred project, adding a landing page for Go devs is probably a good idea. I know dcrd already has a lot of this in its README + docs, but this is applicable to all Go projects and not just that one.