| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I think we should use a proper URL builder here, instead of string manipulations. the current code seems fragile and a bit difficult to reason with. i.e. u, err := url.Parse(baseUrl)
if err != nil {
log.Fatal(err)
}
q := u.Query()
q.Set("url", ...)
u.RawQuery = q.Encode()
fmt.Println(u) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is host dependent, but providing example.com/?url... can be treated as a different path to example.com?url....
Instead we rely on what ever the user provides as base_url and append the query params to that base url.