<#7424 fix: Get rid of deprecated x/net/http2/h2c>...
# flyte-github
a
#7424 fix: Get rid of deprecated x/net/http2/h2c Pull request opened by alexandear Why are the changes needed? Go 1.25 added native support for unencrypted HTTP/2 (h2c) directly in the standard
net/http
. This PR removes the dependency on the deprecated package
golang.org/x/net/http2/h2c
. What changes were proposed in this pull request? 1. Replaced
golang.org/x/net/http2/h2c
usage with the native Go 1.25
http.Protocols
API in two places: • flytestdlib/app/app.go • runs/test/api/setup_test.go 1. Enabled the
depguard
linter in
flytestdlib/.golangci.yml
to prevent future regressions. How was this patch tested? Both files compile cleanly with go build. The behavior is equivalent - the server continues to accept both HTTP/1.1 and unencrypted HTTP/2 connections.
Copy code
curl -i --http2-prior-knowledge http://localhost:8090
Labels • changed Setup process Screenshots • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. Related PRs Stack Docs link https://pkg.go.dev/golang.org/x/net/http2/h2c - deprecated package being replaced flyteorg/flyte