Skip to content

Commit

Permalink
runtime: use r.Context() (#473)
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Renatus <[email protected]>
  • Loading branch information
srenatus authored and achew22 committed Oct 11, 2017
1 parent c323909 commit b2423da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions runtime/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) {

// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.Path.
func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// TODO: use r.Context for go 1.7+
ctx := context.Background()
ctx := r.Context()

path := r.URL.Path
if !strings.HasPrefix(path, "/") {
Expand Down

0 comments on commit b2423da

Please sign in to comment.