MCPcopy Index your code
hub / github.com/cockroachdb/errors / trimPath

Function trimPath

withstack/reportable.go:87–94  ·  view source on GitHub ↗

trimPath is a copy of the same function in package sentry-go.

(filename string)

Source from the content-addressed store, hash-verified

85
86// trimPath is a copy of the same function in package sentry-go.
87func trimPath(filename string) string {
88 for _, prefix := range trimPaths {
89 if trimmed := strings.TrimPrefix(filename, prefix); len(trimmed) < len(filename) {
90 return trimmed
91 }
92 }
93 return filename
94}
95
96var trimPaths []string
97

Callers 1

parsePrintedStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…