mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
915126bb91
commit
e3e09e3d5f
12 changed files with 27 additions and 11 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue