And what would that line of code be? As far as I am aware you have to parse the URL string, and it only gets more complicated when you add more URL parameters. Which definitely leads to boilerplate code shared across projects.
strings.Split(urlString, "user/")[1]
https://go.dev/play/p/tWi-Ge0CA1XThat's one way to do it.
>more URL parameters
I thought thats what http.Request.ParseForm() was for (assuming correct formatting)
... is like, a core job of an HTTP router? You're not just begging the question, you're beating someone up and rifling through their pockets for it.