GO get original router url of a request

55 Views Asked by At

In flask, I do

from flask import request

route = request.url_rule.rule if request.url_rule else request.path

So that I can get the "original" URL registered in Blueprint.

For example, when API http://localhost/v1/user/001 was called, I'd got route's value /v1/user/<user_id> -- the "original" URL I want, for the next operations.

How do I achieve that with GO?

--

I added up some information as below comments

0

There are 0 best solutions below