mux icon indicating copy to clipboard operation
mux copied to clipboard

Clarify documentation examples of Route methods

Open andrew-werdna opened this issue 2 years ago • 1 comments

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.

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

@james-d-elliot you just approved PR #667, what do you think of this one?

andrew-werdna avatar Apr 07 '22 11:04 andrew-werdna

@apoorvajagtap ptal

coreydaley avatar Aug 16 '23 02:08 coreydaley

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% <ø> (ø)

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