Skip to content

feat: suggest to use slog.DiscardHandler #81

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

Merged
merged 3 commits into from
Apr 5, 2025
Merged

feat: suggest to use slog.DiscardHandler #81

merged 3 commits into from
Apr 5, 2025

Conversation

tmzane
Copy link
Member

@tmzane tmzane commented Apr 4, 2025

Closes #78

@tmzane tmzane self-assigned this Apr 4, 2025
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.28%. Comparing base (eae36ea) to head (76cb2bb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sloglint.go 87.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
- Coverage   84.14%   83.28%   -0.86%     
==========================================
  Files           2        2              
  Lines         309      329      +20     
==========================================
+ Hits          260      274      +14     
- Misses         39       43       +4     
- Partials       10       12       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tmzane
Copy link
Member Author

tmzane commented Apr 4, 2025

@ldez would you be ok with this check being enabled by default in golangci-lint?

@ldez ldez mentioned this pull request Apr 4, 2025
@ldez
Copy link
Contributor

ldez commented Apr 4, 2025

No problem, it's a new rule.

I created a PR #82 with a review of this PR.

@tmzane tmzane merged commit 6b7f937 into main Apr 5, 2025
11 of 12 checks passed
@tmzane tmzane deleted the discard-handler branch April 5, 2025 11:39
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.

Suggest slog.DiscardHandler instead of slog.NewTextHandler(io.Discard, nil) for Go 1.24+
2 participants