doc: add error handling on http.ListenAndServe

Fixes #19511

Change-Id: I5585726773b822dba0be0196961132323ebbe084
Reviewed-on: https://go-review.googlesource.com/53071
Reviewed-by: Chris Broadfoot <cbro@golang.org>
This commit is contained in:
Francesc Campoy Flores 2017-08-03 10:52:42 -07:00
parent 915126bb91
commit e3e09e3d5f
12 changed files with 27 additions and 11 deletions

View file

@ -7,6 +7,7 @@ package main
import (
"html/template"
"io/ioutil"
"log"
"net/http"
)
@ -69,5 +70,5 @@ func main() {
http.HandleFunc("/view/", viewHandler)
http.HandleFunc("/edit/", editHandler)
http.HandleFunc("/save/", saveHandler)
http.ListenAndServe(":8080", nil)
log.Fatal(http.ListenAndServe(":8080", nil))
}