Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only skip GOROOT frames when GOROOT is non-empty. #12

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

joel-u410
Copy link
Contributor

This fixes an issue I observed when running my compiled application and attempting to see a stack trace. The traces were always empty when running the precompiled binary, even though they worked fine when using go run. After some debugging, I discovered that due to the -trimpath argument I was using when building, the runtime.GOROOT() was returning an empty string. Therefore, every stack frame was being omitted.

Also a small typo fix 🙂

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (145677a) 76.15% compared to head (8e61a37) 76.15%.

Files Patch % Lines
error.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   76.15%   76.15%           
=======================================
  Files          10       10           
  Lines         864      864           
=======================================
  Hits          658      658           
  Misses        179      179           
  Partials       27       27           
Flag Coverage Δ
unittests 76.15% <80.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samber
Copy link
Owner

samber commented Nov 17, 2023

✅ -> v1.9.1

@samber samber merged commit 4811ab9 into samber:main Nov 17, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants