From 9915da78233e19b68c043da08717693b4d61a74c Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Wed, 18 Nov 2015 16:27:02 -0500 Subject: Get rid of unnecessary whitespace --- main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.go b/main.go index 9385f85..1957af1 100644 --- a/main.go +++ b/main.go @@ -10,11 +10,9 @@ import ( func main() { db := getInitializedDatabase() - http.HandleFunc("/zip/", func(w http.ResponseWriter, r *http.Request) { handleZipcodeRequest(w, r, db) }) - http.ListenAndServe(getListeningAddress(), nil) } @@ -24,7 +22,6 @@ func getInitializedDatabase() *ZipcodeDatabase { if err != nil { fmt.Printf("%s\n", err) } - return db } @@ -33,12 +30,12 @@ func getListeningAddress() string { if port == "" { port = "8080" } - return strings.Join([]string{ ":", port, }, "") } + func handleZipcodeRequest(response http.ResponseWriter, request *http.Request, db *ZipcodeDatabase) { zip := zipcodeForRequest(request) if details := db.Find(zip); details == nil { -- cgit v1.2.3