Reputation: 61
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.
Upvotes: 1
Views: 368
Reputation: 61
Use cases if someone needs.
• Constructing redirects to send to a client - eg programmatically, so you don’t have to fix the URLs in your code elsewhere
• Building examples & tests
• Generating docs
Upvotes: 1