From 21791d06e31f9e5915fe71d7b20b6403af1b512f Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 28 Feb 2019 18:30:56 +0100 Subject: renamed the function handling requests on / from Index to IndexHandler --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index da2fdb0..677f405 100644 --- a/main.go +++ b/main.go @@ -68,8 +68,8 @@ func NFW(w http.ResponseWriter, r *http.Request) { } } -// Index handles request on the / endpoint -func Index(w http.ResponseWriter, r *http.Request) { +// IndexHandler handles request on the / endpoint +func IndexHandler(w http.ResponseWriter, r *http.Request) { log.Print(fmt.Fprintln(w, "usage: nfw.docker.localhost/NFW?x=&y=&z=")) } @@ -77,7 +77,7 @@ func main() { router := mux.NewRouter() // routes - router.HandleFunc("/", Index).Methods("GET") + router.HandleFunc("/", IndexHandler).Methods("GET") router.HandleFunc("/NFW", NFW).Methods("GET") log.Println("Starting the service on port localhost:8081") -- cgit 1.4.1