Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/bracesdev/errtrace
/ wrap
Function
wrap
example_errhelper_test.go:23–26 ·
view source on GitHub ↗
(err error, fields ...string)
Source
from the content-addressed store, hash-verified
21
}
22
23
func
wrap(err error, fields ...string) error {
24
return
errtrace.GetCaller().
25
Wrap(fmt.Errorf(
"%w %v"
, err, fields))
26
}
27
28
func
Example_getCaller() {
29
got := errtrace.FormatString(f1Wrap())
Callers
3
f1Wrap
Function · 0.70
f2Wrap
Function · 0.70
f3Wrap
Function · 0.70
Calls
2
GetCaller
Function · 0.92
Wrap
Method · 0.80
Tested by
no test coverage detected