Commit 7859137
authored
Allow multiple whitespace between method & pattern (#1013)
Allow separating the method and pattern with [ \t]+, this matches the
stdlib change that was made in golang/go@7b583fd
The rationale is the same as the stdlib issue, it allows you to visually
line up patterns with variable-width methods:
r.Handle("GET /my-route", handler1)
r.Handle("POST /my-route", handler2)
r.Handle("DELETE /my-route", handler3)
In general aligning ourselves with the stdlib brings less surprise for
end users.1 parent 80d8da2 commit 7859137
2 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 122 | + | |
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
671 | 680 | | |
672 | 681 | | |
673 | 682 | | |
| |||
0 commit comments