Why not url.Parse then modify the url object it seems to support this. 

http://play.golang.org/p/DKPqgL_w6Z