File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ package oops
2
2
3
3
import (
4
4
"fmt"
5
+ "reflect"
5
6
"runtime"
6
- "runtime/debug"
7
7
"strings"
8
8
)
9
9
@@ -13,10 +13,12 @@ import (
13
13
/// -> Apache 2.0 LICENSE
14
14
///
15
15
16
+ type fake struct {}
17
+
16
18
var (
17
19
StackTraceMaxDepth int = 10
18
20
19
- buildInfo , _ = debug . ReadBuildInfo ()
21
+ packageName = reflect . TypeOf ( fake {}). PkgPath ()
20
22
)
21
23
22
24
type oopsStacktraceFrame struct {
@@ -99,7 +101,6 @@ func newStacktrace(span string) *oopsStacktrace {
99
101
}
100
102
function := shortFuncName (f )
101
103
102
- packageName := buildInfo .Path
103
104
packageNameExamples := packageName + "/examples/"
104
105
105
106
isGoPkg := len (runtime .GOROOT ()) > 0 && strings .Contains (file , runtime .GOROOT ()) // skip frames in GOROOT if it's set
You can’t perform that action at this time.
0 commit comments