Skip to content

Commit

Permalink
Change pointer receiver to value receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored and jprobinson committed Jan 25, 2018
1 parent 80d369f commit 4c5b6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type GzipResponseWriterWithCloseNotify struct {
*GzipResponseWriter
}

func (w *GzipResponseWriterWithCloseNotify) CloseNotify() <-chan bool {
func (w GzipResponseWriterWithCloseNotify) CloseNotify() <-chan bool {
return w.ResponseWriter.(http.CloseNotifier).CloseNotify()
}

Expand Down Expand Up @@ -282,7 +282,7 @@ func GzipHandlerWithOpts(opts ...option) (func(http.Handler) http.Handler, error
defer gw.Close()

if _, ok := w.(http.CloseNotifier); ok {
gwcn := &GzipResponseWriterWithCloseNotify{gw}
gwcn := GzipResponseWriterWithCloseNotify{gw}
h.ServeHTTP(gwcn, r)
} else {
h.ServeHTTP(gw, r)
Expand Down

0 comments on commit 4c5b6dc

Please sign in to comment.