[go-nuts] Re: httptest and gorilla/mux route variables

2023-01-18 Thread sanwal farooque
Kevin this is brilliant. It Works <3 <3 On Saturday, 4 December 2021 at 04:29:57 UTC+5 Kevin Mathew S wrote: > This works perfectly for me > > func newReq(method, path, body string, vars map[string]string) > *http.Request { > r := httptest.NewRequest(method, path, strings.NewReader(body)) > retu

[go-nuts] Re: httptest and gorilla/mux route variables

2021-12-03 Thread Kevin Mathew S
This works perfectly for me func newReq(method, path, body string, vars map[string]string) *http.Request { r := httptest.NewRequest(method, path, strings.NewReader(body)) return mux.SetURLVars(r, vars) } On Tuesday, May 12, 2015 at 7:34:21 PM UTC+5:30 al...@getloopd.com wrote: > Awesome! This