-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix minor mistake in HeadersRegexp doc #667
Conversation
@Algebra8 LGTM! |
Since |
Sorry for the delay, I got busy with some other things and lost track of this issue 😞 @andrew-werdna thanks for bringing that point up, and it's a great point, but in my opinion the documentation should reflect the outer most visibility to the user and it's not great ux for the user to have to dig into the source code to come to the same realization you did. And thanks for the PR! |
I think I know what you mean. I had to read the source code just now to discover that both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrew-werdna thanks for bringing that point up, and it's a great point, but in my opinion, the documentation should reflect the outermost visibility to the user and it's not great UX for the user to have to dig into the source code to come to the same realization you did.
Hi @Algebra8, I had a closer look at the code I believe we shouldn't update the docs but rather add a new method HeadersRegexp
in the mux.go
file like it is done for other multiple methods.
UPDATE: I'm okay with the current changes. Because going forward if someone gets maintainership then the maintainer may remove duality as mentioned in the v2 proposal here: #387 (comment)
I'm not saying the v2 proposal is finalised but there are higher chances of getting it fixed/released.
Signed-off-by: Corey Daley <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #667 +/- ##
==========================================
+ Coverage 78.01% 78.44% +0.43%
==========================================
Files 5 5
Lines 887 877 -10
==========================================
- Hits 692 688 -4
+ Misses 140 135 -5
+ Partials 55 54 -1
|
@apoorvajagtap ptal |
Fixes #666 **Summary of Changes** 1. Update `Route` method documentation comments where the example in the comments showed a `Router` before. Updated method names include: * `Headers` * `HeadersRegexp` * `Host` * `Path` * `Queries` * `Subrouter` * `URL` Notes: * This includes what PR #667 did plus some changes requested by a maintainer in the comments * I was a little torn about changing the example in `Subrouter` since `(*Router).Host()` (like several `(*Router)` methods) just calls `(*Router).NewRoute().Host()` so I understand if maintainers are ambivalent about that example or want it to remain the same. Signed-off-by: Corey Daley <[email protected]> Co-authored-by: Andrew Brown <[email protected]> Co-authored-by: Corey Daley <[email protected]>
@coreydaley I think we can close this one, as #672 incorporates |
I agree with that assessment. You could probably merge main into this to be absolutely sure. |
Has already been fixed in #672 |
Pull request was closed
Fixes #666
Summary of Changes
HeadersRegexp
docs.Since this is a doc change I don't think it needs tests.