Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
Keloran committed Dec 5, 2022
1 parent a8214bb commit bb28c63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logs/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

const (
skipDepth = 3
defaultSkipDepth = 3
)

func (b BugFixes) Unwrap(e error) error {
Expand Down Expand Up @@ -148,14 +148,14 @@ func (b *BugFixes) skipDepth(depth int) {
}

func (b BugFixes) DoReporting() {
b.skipDepth(skipDepth)
b.skipDepth(defaultSkipDepth)
if b.SkipDepthOverride != 0 {
b.skipDepth(b.SkipDepthOverride)
}

skipDepthOverride := skipDepth
skipDepthOverride := defaultSkipDepth
for {
if notDeepEnough := strings.Contains(b.File, "logs.go"); notDeepEnough {
if notDeepEnough := strings.Contains(b.File, "go-bugfixes/logs/logs.go"); notDeepEnough {
b.skipDepth(skipDepthOverride + 1)
} else {
break
Expand Down

0 comments on commit bb28c63

Please sign in to comment.