Closed mar1n3r0 closed 4 years ago
Tested in all middleware scenarios.
func Hello(w http.ResponseWriter, r *http.Request) { params, _ := context.Parameters(r.Context()) fmt.Fprintf(w, "params: %v\n", params) fmt.Fprintf(w, "hello, %s!\n", params.Value("name")) }
URL mock:
http://localhost:8080/hello/test
output:
params: [] hello, !
Context package imported as suggested with:
export GO111MODULE=on go get -u -v github.com/vardius/gorouter/v4/context
Fixed as per: GO111MODULE with Go 1.13
Tested in all middleware scenarios.
URL mock:
output:
Context package imported as suggested with: