Hacker News new | ask | show | jobs
by avg_dev 929 days ago
How does one go about implementing something like this? I am quite curious.
2 comments

Judging by the project, it's implemented by instrumenting the source code; either manually modifying error returns with a wrapper function, or by running source files through an automated tool that will find and modify the return statements for you.
I suspect it is based on https://pkg.go.dev/runtime#Caller