Add function MapRoutes() to make module Routable.
. . . func (m module) MapRoutes() { router := eather.GetRouter() router.HandleFunc("/", controllerEmpty).Methods("GET") } func controllerEmpty(w http.ResponseWriter, r *http.Request) { eather.SendJSONResponse(w, eather.Response{Message: "Empty controller"}) } . . .
This will set controllerEmpty for path /.
/
Last updated 4 years ago