Skip to content

Commit

Permalink
Fix vet errors with go 1.7
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Scothern <richard.scothern@docker.com>
  • Loading branch information
Richard Scothern committed Jul 18, 2016
1 parent 4e17ab5 commit fcea614
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions context/http.go
Expand Up @@ -103,20 +103,22 @@ func GetRequestID(ctx Context) string {
// WithResponseWriter returns a new context and response writer that makes
// interesting response statistics available within the context.
func WithResponseWriter(ctx Context, w http.ResponseWriter) (Context, http.ResponseWriter) {
irw := instrumentedResponseWriter{
ResponseWriter: w,
Context: ctx,
}

if closeNotifier, ok := w.(http.CloseNotifier); ok {
irwCN := &instrumentedResponseWriterCN{
instrumentedResponseWriter: irw,
CloseNotifier: closeNotifier,
instrumentedResponseWriter: instrumentedResponseWriter{
ResponseWriter: w,
Context: ctx,
},
CloseNotifier: closeNotifier,
}

return irwCN, irwCN
}

irw := instrumentedResponseWriter{
ResponseWriter: w,
Context: ctx,
}
return &irw, &irw
}

Expand Down

0 comments on commit fcea614

Please sign in to comment.