Skip to content

Commit 25efc48

Browse files
authored
Merge pull request grpc-ecosystem#319 from campoy/master
Do not ignore the error coming from http.ListenAndServe in examples
2 parents 6b88bed + be77ba5 commit 25efc48

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
130130
Now you need to write an entrypoint of the proxy server.
131131
```go
132132
package main
133+
133134
import (
134135
"flag"
135136
"net/http"
@@ -158,8 +159,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
158159
return err
159160
}
160161
161-
http.ListenAndServe(":8080", mux)
162-
return nil
162+
return http.ListenAndServe(":8080", mux)
163163
}
164164
165165
func main() {

examples/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ func Run(address string, opts ...runtime.ServeMuxOption) error {
9696
}
9797
mux.Handle("/", gw)
9898

99-
http.ListenAndServe(address, allowCORS(mux))
100-
return nil
99+
return http.ListenAndServe(address, allowCORS(mux))
101100
}
102101

103102
func main() {

0 commit comments

Comments
 (0)