I think you want url.Parse here.