Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
avg_dev
2y ago
0 comments
Share
How does one go about implementing something like this? I am quite curious.
0 comments
default
newest
oldest
yalue
2y 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
2y ago
I suspect it is based on
https://pkg.go.dev/runtime#Caller
j
/
k
navigate · click thread line to collapse