use references when possible

This commit is contained in:
sentriz
2019-06-05 17:34:01 +01:00
parent 406b133713
commit 146f157782
11 changed files with 128 additions and 115 deletions

View File

@@ -44,7 +44,9 @@ func testNameToPath(name string) string {
func testQueryCases(t *testing.T, handler http.HandlerFunc, cases []*queryCase) {
for _, qc := range cases {
qc := qc // pin
t.Run(qc.expectPath, func(t *testing.T) {
t.Parallel()
// ensure the handlers give us json
qc.params.Add("f", "json")
req, _ := http.NewRequest("", "?"+qc.params.Encode(), nil)