File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,13 @@ package mux
66
77import "net/http"
88
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.
9+ // SetURLVars sets the URL variables for the given request, to be accessed via
10+ // mux.Vars for testing route behaviour.
11+ //
12+ // This API should only be used for testing purposes; it provides a way to
13+ // inject variables into the request context. Alternatively, URL variables
14+ // can be set by making a route that captures the required variables,
15+ // starting a server and sending the request to that server.
1416func SetURLVars (r * http.Request , val map [string ]string ) * http.Request {
1517 return setVars (r , val )
1618}
You can’t perform that action at this time.
0 commit comments