-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go1.11: http.CloseNotifier is deprecated #736
Comments
I think this should be a reasonably easy first PR for anyone wanting to do it - the CloseNotifier code is only there for when the request context isn't available. Feel free to submit a PR with it removed :). |
@johanbrandhorst I would like to work on this issue. if cn, ok := w.(http.CloseNotifier); ok {
go func(done <-chan struct{}, closed <-chan bool) {
select {
case <-done:
case <-closed:
cancel()
}
}(ctx.Done(), cn.CloseNotify())
} |
Yeah, we can safely remove that whole if-clause I think. |
I intend to bump all the open PRs once that is in master |
This is a great first issue for anyone looking for an easy contribution! |
Hi all,
I was checking if we could upgrade our project to Go 1.11 now that it's released, and one of our static analysis tools is erring with "http.CloseNotifier is deprecated". I tried upgrading my binaries locally, and then checked the git repo and see that it's still present in template.go on the master branch.
Could the template be upgraded so that we're no longer relying on deprecated code? (I'll admit that I don't know what the GRPC-Gateway compatibility promise is, and if such an upgrade would break that.)
Thanks,
-Spikes
The text was updated successfully, but these errors were encountered: