about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-02-28 18:41:34 +0100
committerEmile <hanemile@protonmail.com>2019-02-28 18:41:34 +0100
commitd5114b4c079325d8e14a029694a2d1ec46b9a874 (patch)
tree2cb74fda5e9814d93fa302fcbb3c2b0fade6e1c4
parentc66eff670c050730a133062144679bce56d58b3b (diff)
:art: renamed the generate function to generateHandler
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 16090d7..e9e6558 100644
--- a/main.go
+++ b/main.go
@@ -112,7 +112,7 @@ func gen(galaxyRange float64) point {
 	return point{0, 0, 0}
 }
 
-func generate(w http.ResponseWriter, r *http.Request) {
+func generateHandler(w http.ResponseWriter, r *http.Request) {
 	params := r.URL.Query()
 
 	amount, _ := strconv.ParseInt(params.Get("num"), 10, 64)
@@ -137,6 +137,6 @@ func indexHandler(w http.ResponseWriter, r *http.Request) {
 func main() {
 	router := mux.NewRouter()
 	router.HandleFunc("/", indexHandler).Methods("GET")
-	router.HandleFunc("/gen", generate).Methods("GET")
+	router.HandleFunc("/gen", generateHandler).Methods("GET")
 	log.Fatal(http.ListenAndServe(":8123", router))
 }