mux
mux copied to clipboard
Fix minor mistake in HeadersRegexp doc
Fixes #666
Summary of Changes
- Fixed mistake in
HeadersRegexp
docs.
PS: Make sure your PR includes/updates tests! If you need help with this part, just ask!
Since this is a doc change I don't think it needs tests.
@Algebra8 LGTM!
BTW, func (*Route) Host
and some of the methods have the same mistake, so why not fix them together?
Since Router
and Route
both share some method names in common (where the Router
just calls r.NewRoute().<Method>(...)
I think that many of the examples are actually syntactically correct. However, the intent may have been to demonstrate something a Route
can do specifically. I have updated all the instances where this occurred and have opened a PR for this here
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 Router
and Route
types shared multiple method names.
~@elithrar we can merge this PR. Let me know WDYT?~
Codecov Report
Merging #667 (c37390b) into main (395ad81) will increase coverage by
0.43%
. Report is 1 commits behind head on main. The diff coverage isn/a
.
:exclamation: Current head c37390b differs from pull request most recent head 5e94bf4. Consider uploading reports for the commit 5e94bf4 to get more accurate results
@@ 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
Files Changed | Coverage Ξ | |
---|---|---|
route.go | 69.29% <ΓΈ> (+0.83%) |
:arrow_up: |
@apoorvajagtap ptal
@coreydaley I think we can close this one, as #672 incorporates HeadersRegexp
. Let me know in case I missed anything.
I agree with that assessment. You could probably merge main into this to be absolutely sure.
Has already been fixed in https://github.com/gorilla/mux/pull/672