mux
mux copied to clipboard
Clarify documentation examples of Route methods
Fixes #666
Summary of Changes
- Update
Route
method documentation comments where the example in the comments showed aRouter
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.
@james-d-elliot you just approved PR #667, what do you think of this one?
@apoorvajagtap ptal
Codecov Report
Merging #672 (d94561d) into main (24c3e7f) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #672 +/- ##
=======================================
Coverage 78.44% 78.44%
=======================================
Files 5 5
Lines 877 877
=======================================
Hits 688 688
Misses 135 135
Partials 54 54
Files Changed | Coverage Δ | |
---|---|---|
route.go | 69.29% <ø> (ø) |