use url.Parse and cleanup doc