Skip to content

Commit

Permalink
Do not ignore the error coming from http.ListenAndServe in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesc Campoy committed Feb 28, 2017
1 parent f3aa758 commit 82e181c
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 82e181c

Please sign in to comment.