I am trying to write a unit test using gotests and gomock to my restful service written in golang using gorilla but service fails to get variables from the url
Here is my request
req, err := http.NewRequest("GET", "product/5b5758f9931653c36bcaf0a0", nil)
actual endpoint is product/{id}
when I step into my service at the below code
params := mux.Vars(req)
params
map is empty when it should have id
key mapped to 5b5758f9931653c36bcaf0a0
Strange part is endpoint works fine from post man.
May I know whats wrong with the request?
HandleFunce
look like? – Kroll