+4
-1
main.go
+4
-1
main.go
···
12
12
if err := http.ListenAndServe(
13
13
"localhost:3000",
14
14
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
15
-
w.Write([]byte("hello"))
15
+
_, err := w.Write([]byte("hello"))
16
+
if err != nil {
17
+
fmt.Println("oh no!")
18
+
}
16
19
}),
17
20
); err != nil {
18
21
os.Exit(1)