Closed
Description
There are two bundled packages in $GOROOT/src/net/http:
bradfitz@go:~/go/src/net/http$ git grep go:gener
h2_bundle.go://go:generate bundle -o h2_bundle.go -prefix http2 golang.org/x/net/http2
socks_bundle.go://go:generate bundle -o socks_bundle.go -dst net/http -prefix socks -underscore golang.org/x/net/internal/socks
A bundled package is a a package that gets fused in with another package to avoid an otherwise-circular dependency. (We can't just import golang.org/x/net/http2 from net/http as http2 implements interfaces using types in their signatures defined in net/http)
Currently, to update http2 in std you need to both update the go.mod+vendor files (for some of the http2 subpackages) as well as run the go generate
bundle step to generate h2_bundle.go
.
The bundle appears to just gets it code from whatever you have on your disk in $GOPATH, though. It should use the same version from the current module ($GOROOT/src/go.mod).
/cc @bcmills @jayconrod @alandonovan @dmitshur @ianlancetaylor