MCPcopy
hub / github.com/caddyserver/caddy / trace

Function trace

modules/caddyhttp/errors.go:106–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106func trace() string {
107 if pc, file, line, ok := runtime.Caller(2); ok {
108 filename := path.Base(file)
109 pkgAndFuncName := path.Base(runtime.FuncForPC(pc).Name())
110 return fmt.Sprintf("%s (%s:%d)", pkgAndFuncName, filename, line)
111 }
112 return ""
113}
114
115// ErrorCtxKey is the context key to use when storing
116// an error (for use with context.Context).

Callers 1

ErrorFunction · 0.85

Calls 1

NameMethod · 0.45

Tested by

no test coverage detected