From ef69d2eb1c0687f0bef2a990bfa136b3a2e466a2 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Tue, 22 Jul 2014 17:30:16 +1000 Subject: [PATCH] go-tour: add log.Fatal to HTTP handlers exercise This helps people diagnose the ListenAndServe error. TBR=campoy R=golang-codereviews CC=golang-codereviews https://codereview.appspot.com/115170043 --- content/prog/tour/exercise-http-handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/prog/tour/exercise-http-handlers.go b/content/prog/tour/exercise-http-handlers.go index 57dc8bf..a824531 100644 --- a/content/prog/tour/exercise-http-handlers.go +++ b/content/prog/tour/exercise-http-handlers.go @@ -3,10 +3,11 @@ package main import ( + "log" "net/http" ) func main() { // your http.Handle calls here - http.ListenAndServe("localhost:4000", nil) + log.Fatal(http.ListenAndServe("localhost:4000", nil)) }