Commit 94231ff
Fix table-driven example documentation (#363)
Prior to this change, the example documentation
found in the README.md has an errant code which
won't work in the table-driven code example.
This change modifies the variable name from `t` to `tc`
so it does not conflict with the `t *testing.T` struct
definition.
* Adds a range clause to the `for` statement
* Modifies `for` statement scope to use `tc.shouldPass`, and `tc.routeVariable`
Doc: https://github.com/gorilla/mux#testing-handlers1 parent 4dbd923 commit 94231ff
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
| 596 | + | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
610 | 610 | | |
611 | | - | |
| 611 | + | |
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| |||
0 commit comments