Skip to content

http.CloseNotifier is deprecated #347

@wayneashleyberry

Description

@wayneashleyberry
middleware/wrap_writer.go:103:38: http.CloseNotifier is deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead.  (megacheck)
	cn := f.basicWriter.ResponseWriter.(http.CloseNotifier)
	                                    ^
middleware/wrap_writer.go:129:7: http.CloseNotifier is deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead.  (megacheck)
var _ http.CloseNotifier = &httpFancyWriter{}

Started seeing this pop up in my linters, not sure if this code could simply be removed?


From godoc.org:

Deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead. — https://golang.org/pkg/net/http/#CloseNotifier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions