I'm new in development. Now trying to learn gorilla/mux router. The question is about reversed urls. In gorilla/mux I know we name them with .Name() method and access with .Url(). Could someone explain real use case of reserved URL's(Reverse mapping URL)? But a few hours of googling didn't help me to find any info about that why we even need them? Will be really thankfull if you could show some practical examples.
r := mux.NewRouter() r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). Name("article")To build a URL, get the route and call the URL() method, passing a sequence of key/value pairs for the route variables. For the previous route, we would do:url, err := r.Get("article").URL("category", "technology", "id", "42")- Farhad Kocharli