Skip to content

Commit 4a81284

Browse files
neildgopherbot
authored andcommitted
http2: update docs to disrecommend this package
Every supported feature of the HTTP/2 client and server is accessible via the net/http package. Recommend that users use net/http rather than importing this package. For #67810 Change-Id: I58b9c65af27e2f7172af493f96ee589a6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/net/+/752160 Reviewed-by: Nicholas Husin <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Nicholas Husin <[email protected]> Auto-Submit: Damien Neil <[email protected]>
1 parent dec6603 commit 4a81284

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

http2/http2.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
// Package http2 implements the HTTP/2 protocol.
66
//
7-
// This package is low-level and intended to be used directly by very
8-
// few people. Most users will use it indirectly through the automatic
9-
// use by the net/http package (from Go 1.6 and later).
10-
// For use in earlier Go versions see ConfigureServer. (Transport support
11-
// requires Go 1.6 or later)
7+
// Almost no users should need to import this package directly.
8+
// The net/http package supports HTTP/2 natively.
129
//
13-
// See https://http2.github.io/ for more information on HTTP/2.
10+
// To enable or disable HTTP/2 support in net/http clients and servers, see
11+
// [http.Transport.Protocols] and [http.Server.Protocols].
12+
//
13+
// To configure HTTP/2 parameters, see
14+
// [http.Transport.HTTP2] and [http.Server.HTTP2].
15+
//
16+
// To create HTTP/1 or HTTP/2 connections, see
17+
// [http.Transport.NewClientConn].
1418
package http2 // import "golang.org/x/net/http2"
1519

1620
import (

0 commit comments

Comments
 (0)