summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2015-11-18 16:27:02 -0500
committerBen Burwell <ben.burwell@trifecta.com>2015-11-18 16:27:02 -0500
commit9915da78233e19b68c043da08717693b4d61a74c (patch)
tree431759603a3c903151a415f4bd88d1689b932535
parent5daab60e5e79b5efc76ca8cb53d4525c949c1568 (diff)
Get rid of unnecessary whitespace
-rw-r--r--main.go5
1 files changed, 1 insertions, 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 {