1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 12:32:21 +00:00
This commit is contained in:
Xargin 2018-08-08 19:57:05 +08:00
parent 34a5869067
commit 156a874d6d

View File

@ -119,7 +119,7 @@ func timeMiddleware(next http.Handler) http.Handler {
} }
func main() { func main() {
http.HandleFunc("/", timeMiddleware(hello)) http.Handle("/", timeMiddleware(http.HandlerFunc(hello)))
err := http.ListenAndServe(":8080", nil) err := http.ListenAndServe(":8080", nil)
... ...
} }