当通配符参数中出现双斜杠时,为什么大猩猩复用器会重定向?

Here my handler :

router.HandleFunc("/g/{gparam:.*}", MyHandler)

Bu when i pass something like "123://abc" as param it redirect and modify the param in url to "123:/abc".

is their a way to avoid that ?

It's intended behavior, and is configurable. By default, Gorilla mux will do path cleaning, i.e. removing double slash etc. for new router. You can left the double slash as is by:

router.SkipClean(true)

The SkipClean documentation says:

...
When true, if the route path is "/path//to", it will remain with the double slash. This is helpful if you have a route like: /fetch/http://xkcd.com/534/

Having slash as param, may be your requirement. You need to escape the slashes as %2F.