Y
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
yalue
929 days ago
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.
link
marhee
929 days ago
I suspect it is based on
https://pkg.go.dev/runtime#Caller
link