Skip to content

Commit bd09be0

Browse files
committed
[docs] Log ListenAndServe's err response in example
2 parents 9c19ed5 + 0d753bb commit bd09be0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ package main
219219

220220
import (
221221
"net/http"
222-
222+
"log"
223223
"github.com/gorilla/mux"
224224
)
225225

@@ -233,7 +233,7 @@ func main() {
233233
r.HandleFunc("/", YourHandler)
234234

235235
// Bind to a port and pass our router in
236-
http.ListenAndServe(":8000", r)
236+
log.Fatal(http.ListenAndServe(":8000", r))
237237
}
238238
```
239239

0 commit comments

Comments
 (0)