We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efdbac1 commit 7facf64Copy full SHA for 7facf64
test_helpers.go
@@ -0,0 +1,16 @@
1
+// Copyright 2012 The Gorilla Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package mux
6
7
+import "net/http"
8
9
+// SetURLVars sets URL variables. This can be used to simplify the testing of
10
+// request handlers.
11
+// Alternatively, URL variables can be set by making a route that captures the
12
+// required variables, starting a server and sending the request to that
13
+// server.
14
+func SetURLVars(r *http.Request, val map[string]string) *http.Request {
15
+ return setVars(r, val)
16
+}
testing.go
0 commit comments