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

Closed
iamfinky opened this issue Dec 14, 2017 · 2 comments

Comments

@iamfinky
Copy link

Please answer these questions before submitting your issue. Thanks!

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

1.8

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 play.golang.org 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/golang.org/x/net/http2/go19.go:14:2: 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
@mvdan
Copy link
Member

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.

@bradfitz
Copy link
Contributor

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.

@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.
Projects
None yet
Development

No branches or pull requests

4 participants