1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Akihiro Suda
8b8c01dd87
Merge pull request #40074 from yedamao/fix-integration-cli
integration-cli: Fix `SA1019: httputil.ClientConn is deprecated`
2019-12-19 03:30:34 +09:00
Brian Goff
47c5c67ed8
Merge pull request #40032 from jmartin84/fix-grpc-withdialer-deprecation-warning
Fix grpc withdialer deprecation warning
2019-11-05 12:20:33 -08:00
HuanHuan Ye
203ba72fc5 integration-cli: Fix SA1019: httputil.ClientConn is deprecated
Rewrite sockRequestHijack to requestHijack which use writable
Transport's Response.Body to replace deprecated hijacked httputil.ClientConn.
```
// As of Go 1.12, the Body will also implement io.Writer
// on a successful "101 Switching Protocols" response,
// as used by WebSockets and HTTP/2's "h2c" mode.
Body io.ReadCloser
```.

TestPostContainersAttach and TestExecResizeImmediatelyAfterExecStart
replace all sockRequestHijack to requestHijack.

Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
2019-10-22 10:55:29 +08:00
Sebastiaan van Stijn
a06d7f5a3e
golangci-lint: include all enabled linters in config
This makes it clearer from the configuration what linters
are enabled.

Also disables the `gofmt` linter, because it's superseded
by the `goimports` linter.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:13 +02:00
Sebastiaan van Stijn
086b4541cf
golangci-lint: disable default exclusion rules
The default exclusion rules were too permissive; disable
them, but copy the relevant ones to the configuation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:11 +02:00
Sebastiaan van Stijn
fe3c14d5ba
golangci-lint: fix "golint" not ignoring generated files
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:08 +02:00
Sebastiaan van Stijn
47502344b9
golangci-lint: update exclusion rules for todo's
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:04 +02:00
Justen Martin
3b49bd1d84
replaced call to deprecated grpc method WithDialer with WithContextDialer
Signed-off-by: Justen Martin <jmart@the-coder.com>
2019-10-10 15:34:42 -05:00
Akihiro Suda
1dd9260e47
Merge pull request #39956 from jmartin84/fix-closenotifier-deprecation-warning
Removed deprecated CloseNotifier logic
2019-09-24 02:37:15 +09:00
Sebastiaan van Stijn
6c3113e599
Merge pull request #39951 from yedamao/fix-base-Dial-is-deprecated
Fix base.Dial is deprecated: Use DialContext instead
2019-09-21 13:01:40 +02:00
HuanHuan Ye
a57fd5488d Fix base.Dial is deprecated: Use DialContext instead
1.Change base.Dial to base.DailContext.
2.Remove proxyDialer that was previously used to configure a
net.Dialer to route proxy.Dialer which will route the connections
through the proxy using the connections through a SOCKS proxy.
SOCKS proxies are now supported by configuring only http.Transport.Proxy,
and no longer require changing http.Transport.Dial.

Signed-off-by: HuanHuan Ye <logindaveye@gmail.com>
2019-09-20 10:42:13 +08:00
Sebastiaan van Stijn
851b000641
integration-cli: enable golangci-lint
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-19 10:50:31 +02:00
Justen Martin
23ab331979 Removed deprecated CloseNotifier logic
Signed-off-by: Justen Martin <jmart@the-coder.com>
2019-09-18 16:14:30 -05:00
Sebastiaan van Stijn
6f0dfe44eb
golangci-lint: suppress remaining deprecation errors for now (staticcheck)
```
distribution/registry.go:84:3: SA1019: base.Dial is deprecated: Use DialContext instead, which allows the transport to cancel dials as soon as they are no longer needed. If both are set, DialContext takes priority.  (staticcheck)
registry/registry.go:188:3:    SA1019: base.Dial is deprecated: Use DialContext instead, which allows the transport to cancel dials as soon as they are no longer needed. If both are set, DialContext takes priority.  (staticcheck)

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)

integration-cli/docker_api_attach_test.go:239:134:    SA1019: httputil.ClientConn is deprecated: Use Client or Transport in package net/http instead.  (staticcheck)

daemon/daemon.go:885:3:                               SA1019: grpc.WithDialer is deprecated: use WithContextDialer instead.  Will be supported throughout 1.x.  (staticcheck)

pkg/authorization/response.go:18:2:                   SA1019: http.CloseNotifier is deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead.  (staticcheck)
pkg/authorization/response.go:160:30:                 SA1019: http.CloseNotifier is deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead.  (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:58:01 +02:00
Sebastiaan van Stijn
df7d719e4c
golangci-lint: suppress Xattrs is deprecated: Use PAXRecords instead
```
pkg/archive/archive.go:407:3:       SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead.  (staticcheck)
pkg/archive/archive.go:408:3:       SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead.  (staticcheck)
pkg/archive/archive.go:661:26:      SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead.  (staticcheck)
pkg/archive/archive_linux.go:47:7:  SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead.  (staticcheck)
pkg/archive/archive_linux.go:48:12: SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead.  (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:58:00 +02:00
Sebastiaan van Stijn
f41712c4be
golangci-lint: enable misspell, tweak configuration
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:59 +02:00
Sebastiaan van Stijn
c9553897f3
golangci-lint: enable gosec linter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:58 +02:00
Sebastiaan van Stijn
85b89c9e50
Replace gometalinter with golangci-lint
Replacing gometalinter, because it has been deprecated,
and the repository was archived.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:57 +02:00