Skip to content

Commit

Permalink
Merge pull request grpc-ecosystem#319 from campoy/master
Browse files Browse the repository at this point in the history
Do not ignore the error coming from http.ListenAndServe in examples
  • Loading branch information
tmc committed Feb 28, 2017
2 parents 6b88bed + be77ba5 commit 25efc48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
Now you need to write an entrypoint of the proxy server.
```go
package main

import (
"flag"
"net/http"
Expand Down Expand Up @@ -158,8 +159,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
return err
}

http.ListenAndServe(":8080", mux)
return nil
return http.ListenAndServe(":8080", mux)
}

func main() {
Expand Down
3 changes: 1 addition & 2 deletions examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ func Run(address string, opts ...runtime.ServeMuxOption) error {
}
mux.Handle("/", gw)

http.ListenAndServe(address, allowCORS(mux))
return nil
return http.ListenAndServe(address, allowCORS(mux))
}

func main() {
Expand Down

0 comments on commit 25efc48

Please sign in to comment.