Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
avg_dev
· 3y ago · 0 comments
How does one go about implementing something like this? I am quite curious.
Comments
[–]
yalue
3y 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.
[–]
marhee
3y ago
I suspect it is based on
https://pkg.go.dev/runtime#Caller