Will go 2.0 use http 2.0 instead of 1.1?

(Hridyansh Thakur) #1

since we already have HTTP 2.0 protocol here already and it’s becoming common
what is the chance that Go 2.0 or any other version of go (future) will implement HTTP 2.0 protocol in its net/http package

(Curtis Allyn Green) #2

net/http already implements HTTP 2.0

The http package’s Transport and Server both automatically enable HTTP/2 support for simple configurations. To enable HTTP/2 for more complex configurations, to use lower-level HTTP/2 features, or to use a newer version of Go’s http2 package, import “golang.org/x/net/http2” directly and use its ConfigureTransport and/or ConfigureServer functions. Manually configuring HTTP/2 via the golang.org/x/net/http2 package takes precedence over the net/http package’s built-in HTTP/2 support.

From: https://godoc.org/net/http

Also Go 2.0 isn’t really a thing, more of a collection of concepts about how to expand the language.