December 2017
Intermediate to advanced
404 pages
9h 28m
English
The first step to utilize the package is to make use of the go get command in order to obtain the package to our development environment:
$ go get github.com/gorilla/mux
With that, the mux package will be ready to use. In our code, we can now import the mux package to our web server code:
import "github.com/gorilla/mux"
Inside our code, we now need to create a router using the Gorilla mux package. This is accomplished via the following code:
r := mux.NewRouter()
With this, we will get a router object called r, to help us define our routes and link them with actions to execute.
From this point forward, the code will differ based on the microservice in question since different services will support different routes ...
Read now
Unlock full access