about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-02-28 18:30:56 +0100
committerEmile <hanemile@protonmail.com>2019-02-28 18:30:56 +0100
commit21791d06e31f9e5915fe71d7b20b6403af1b512f (patch)
tree6bcd76713a19a820fa2c6efd32d09be14f1d1475
parent68b5784cb8ed8986b723595cb2e6833b428099a3 (diff)
renamed the function handling requests on / from Index to IndexHandler
-rw-r--r--main.go6
1 files 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=<x>&y=<y>&z=<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")