Skip to content
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

x/net/http2: Golang 1.8 incompatibility: *net/http.Server has no field or method RegisterOnShutdown #23132

ilithium opened this issue Dec 14, 2017 · 2 comments


Copy link

@ilithium ilithium commented Dec 14, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?


Does this issue reproduce with the latest release?

Not on 1.9

What operating system and processor architecture are you using (go env)?

macOS 10.13.2, amd64

What did you do?

Running "swagger generate spec -o ./swagger.json" to generate swagger/openapi output.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on is best.

What did you expect to see?

No problems with Go HTTP2

What did you see instead?

/Users/justin/.gvm/pkgsets/go1.8/global/src/ invalid operation: s (variable of type *net/http.Server) has no field or method RegisterOnShutdown

@gopherbot gopherbot added this to the Unreleased milestone Dec 14, 2017
Copy link

@mvdan mvdan commented Dec 14, 2017

net/http.Server.RegisterOnShutdown was added in Go 1.9, so I am confused by your issue. You are also mixing in x/net/http2, which is a different package.

Copy link

@bradfitz bradfitz commented Dec 14, 2017

Maybe you didn't rebuild swagger. Maybe this is a bug in swagger and how it filters files based on tags.

In any case, it's not a bug in Go because we have continuous builds of the x/net repo for Go 1.8, Go 1.9, and master (Go 1.10) and they're all good.

I'd report a bug against swagger.

@bradfitz bradfitz closed this Dec 14, 2017
@mikioh mikioh changed the title x/net: Golang 1.8 incompatibility: *net/http.Server has no field or method RegisterOnShutdown x/net/http2: Golang 1.8 incompatibility: *net/http.Server has no field or method RegisterOnShutdown Jan 5, 2018
@golang golang locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants