Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love Gin.
https://github.com/gin-gonic/gin
Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks to httprouter. If you need performance and good productivity, you will love Gin.
https://github.com/gin-gonic/gin
create a router using the Gorilla mux
package. This is accomplished via the following code:
r := mux.NewRouter()
eventsrouter := r.PathPrefix("/events").Subrouter()
The preceding code makes use of the router object we created earlier, then calls the PathPrefix
method, which is used to capture any URL path that starts with /events
. Then, finally, we call the Subrouter()
method, which will create a new router object for us to use from now on to handle any incoming requests to URLs that start with /events
. The new router is called eventsrouter
.
Use of the go get
command in order to obtain the package to our development environment:
$ go get github.com/gorilla/mux
import the mux package