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

feat: add server option for NotFoundHandler and MethodNotAllowedHandler #3131

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

liubing0427
Copy link
Contributor

Description (what this PR does / why we need it):

pprof will be registered to DefaultServeMux by default, and go-kratos's NotFoundHandler and MethodNotAllowedHandler will use DefaultServeMux, resulting in the inability to flexibly control the switch of pprof.
This PR adds ServerOption to modify NotFoundHandler and MethodNotAllowedHandler

Which issue(s) this PR fixes (resolves / be part of):

Other special notes for the reviewers:

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 19, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (856bc9a) 84.43% compared to head (85abb47) 84.55%.
Report is 1 commits behind head on main.

❗ Current head 85abb47 differs from pull request most recent head 36b648d. Consider uploading reports for the commit 36b648d to get more accurate results

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3131      +/-   ##
==========================================
+ Coverage   84.43%   84.55%   +0.12%     
==========================================
  Files          88       88              
  Lines        3983     3989       +6     
==========================================
+ Hits         3363     3373      +10     
+ Misses        443      441       -2     
+ Partials      177      175       -2     

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

@dosubot dosubot bot added the LGTM label Jan 5, 2024
@shenqidebaozi shenqidebaozi merged commit 21de240 into go-kratos:main Jan 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants