I have the following snippet of code :
u := *baseURL
u.User = nil
if q := strings.Index(path, "?"); q > 0 {
u.Path = path[:q]
u.RawQuery = path[q+1:]
} else {
u.Path = path
}
log.Printf(" url %v, u.String())
I see that when the baseurl is set to something like this http://localhost:9000/buckets/test%?bucket_uuid=7864b0dcdf0a578bd0012c70aef58aca the url package seems to add an extra escape character near the % sign. For e.g. the output of the above print statement is the following :
2015/03/25 12:02:49 url http://localhost:9000/pools/default/buckets/test%2525?bucket_uuid=7864b0dcdf0a578bd0012c70aef58aca
This seems to only happen when the RawQuery field of the URL is set. Any idea why this is happening ? I'm using go version 1.3.3
Cheers, Manik