moby / moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
https://mobyproject.org/
Apache License 2.0
68.64k stars 18.64k forks source link

Fixme: SA1019: httputil.NewClientConn is deprecated #39926

Open thaJeztah opened 5 years ago

thaJeztah commented 5 years ago

Tracking issue for some remaining linting issues to be fixed after https://github.com/moby/moby/pull/39668 is merged.

client/hijack.go:85:16:                               SA1019: httputil.NewClientConn is deprecated: Use the Client or Transport in package net/http instead.  (staticcheck)
integration-cli/docker_api_attach_test.go:245:12:     SA1019: httputil.NewClientConn is deprecated: Use the Client or Transport in package net/http instead.  (staticcheck)
integration/plugin/authz/authz_plugin_test.go:180:7:  SA1019: httputil.NewClientConn is deprecated: Use the Client or Transport in package net/http instead.  (staticcheck)
integration/plugin/authz/authz_plugin_test.go:479:12: SA1019: httputil.NewClientConn is deprecated: Use the Client or Transport in package net/http instead.  (staticcheck)

These warnings are currently suppressed in hack/validate/golangci-lint.yml (after https://github.com/moby/moby/pull/39668 is merged), so when this is fixed, those lines should be removed

yedamao commented 5 years ago

http.Client/Transport not support hijack

thaJeztah commented 5 years ago

hm okay; I think in that case we may want to keep the exclusion rule for the linter (possibly add "ignore" comments to the code itself), but explain why it's still used