mux icon indicating copy to clipboard operation
mux copied to clipboard

Fix minor mistake in HeadersRegexp doc

Open Algebra8 opened this issue 2 years ago β€’ 5 comments

Fixes #666

Summary of Changes

  1. 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 avatar Jan 18 '22 00:01 Algebra8

@Algebra8 LGTM!
BTW, func (*Route) Host and some of the methods have the same mistake, so why not fix them together?

ya5u avatar Feb 08 '22 13:02 ya5u

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

andrew-werdna avatar Mar 26 '22 22:03 andrew-werdna

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!

Algebra8 avatar Mar 26 '22 22:03 Algebra8

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.

andrew-werdna avatar Mar 26 '22 22:03 andrew-werdna

~@elithrar we can merge this PR. Let me know WDYT?~

amustaque97 avatar Jun 07 '22 20:06 amustaque97

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 is n/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:

codecov[bot] avatar Aug 16 '23 02:08 codecov[bot]

@apoorvajagtap ptal

coreydaley avatar Aug 16 '23 02:08 coreydaley

@coreydaley I think we can close this one, as #672 incorporates HeadersRegexp. Let me know in case I missed anything.

apoorvajagtap avatar Aug 17 '23 04:08 apoorvajagtap

I agree with that assessment. You could probably merge main into this to be absolutely sure.

james-d-elliott avatar Aug 17 '23 05:08 james-d-elliott

Has already been fixed in https://github.com/gorilla/mux/pull/672

coreydaley avatar Aug 17 '23 10:08 coreydaley