Skip to content

Commit

Permalink
chore: fix go1.22 tests coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
  • Loading branch information
maxatome committed Feb 7, 2024
1 parent aadee2b commit 7dc6c82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ jobs:
coverage-safe.out \
coverage-race.out \
coverage-race-safe.out |
egrep -v '^github\.com/maxatome/go-testdeep/internal/json/parser\.go:' > coverage.out
egrep -v '^github\.com/maxatome/go-testdeep/internal/(json/parser\.go:|test/)' > coverage.out
goveralls -coverprofile=coverage.out -service=github
6 changes: 1 addition & 5 deletions internal/location/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ func New(callDepth int) (loc Location, ok bool) {
loc.File = loc.File[index+1:]
}

pc, _, _, ok := runtime.Caller(callDepth)
if !ok {
return
}

pc, _, _, _ := runtime.Caller(callDepth)
loc.Func = runtime.FuncForPC(pc).Name()
return
}
Expand Down

0 comments on commit 7dc6c82

Please sign in to comment.