Routing Library
Golang actually provides ServeMux
as a handler that can handle several endpoints or the term is routing
. But most Golang programmers will usually use libraries to do this routing because ServeMux
does not have advanced features such as path variables, auto binding parameters and middleware. So there are many other alternatives that we can use for routing libraries besides ServeMux
.
Multiple Routing Libraries
There are several routing libraries that you can use to make it easier when developing a website using Golang, including the following:
- https://github.com/julienschmidt/httprouter
- https://github.com/gorilla/mux
- https://github.com/go-chi/chi
- https://github.com/julienschmidt/go-http-routing-benchmark
Later we will discuss several tutorials in depth with special topics for this Routing Library. Just wait for the next tutorial post.
Previous post
19 How to Understanding HTTP Middleware in Golang
Next post