121 Commits

Author SHA1 Message Date
Rob Murray
54a6ec374a Update client MaxAPIVersion to 1.53
The daemon's MaxAPIVersion was updated in commit f6b1488.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-16 11:03:58 +00:00
Sebastiaan van Stijn
04ab3d562c client: don't downgrade when failing to negotiate
Historically, the client would downgrade to API v1.24 when failing
to negotiate as this was the API version from before API-version
negotiation was introduced.

Given that those daemons are EOL and those API versions no longer
supported, we should not fall back to an older API version, and
just continue using the latest / current version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 13:52:27 +01:00
Sebastiaan van Stijn
189942570a client: enable API-version negotiation by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 13:52:27 +01:00
Sebastiaan van Stijn
e752ec0f8e client: fix typo in comment
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 13:52:24 +01:00
Sebastiaan van Stijn
4e2e2cde7e client: simplify logic for manual vs auto API versions
When manually setting the API version to use, automatic API version
negotiation should no longer be performed. Instead of keeping track
of these options individually, we can mark negotiation to have happend
if either the version was set manually, or if API version negotiation
took place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 20:30:49 +01:00
Sebastiaan van Stijn
53764de815 client: make WithAPIVersion, WithAPIVersionFromEnv order-independent
Environment-variables are expected to override config / defaults, so
make sure that the DOCKER_API_VERSION env-var always takes priority.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 13:54:32 +01:00
Sebastiaan van Stijn
a5c7f3f9c8 client: don't negotiate malformed responses
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 13:54:31 +01:00
Sebastiaan van Stijn
611c7dce43 client: export fallbackAPIVersion as MinAPIVersion
Export the const and rename it to better reflect its intent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-14 10:26:37 +01:00
Sebastiaan van Stijn
dae3650dcc client: rename/deprecate WithVersion, WithVersionFromEnv
Add WithAPIVersion and WithAPIVersionFromEnv to be more clear on
the intent, and to align with other related options and fields.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 22:39:05 +01:00
Sebastiaan van Stijn
d1f70d4f54 client: deprecate NewClientWithOpts in favor of New
Use a more idiomatic name so that it can be used as `client.New()`.

We should look if we want `New()` to have different / updated defaults
i.e., enable `WithEnv` as default, and have an opt-out and have API-
version negotiation enabled by default (with an opt-out option).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-30 18:09:44 +01:00
Sebastiaan van Stijn
3c62b06de2 client: fix example, and add runnable example
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 15:16:58 +01:00
Sebastiaan van Stijn
edbf321ce6 client: remove NegotiateAPIVersion, NegotiateAPIVersionPing
Remove these methods in favor of adding negotiation options to the
Ping method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 19:27:48 +01:00
Austin Vazquez
f40e1a7582 api: move types/versions to client/pkg and daemon/internal
This change moves the api/types/versions package out into client and daemon versions.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-23 19:22:31 -05:00
Sebastiaan van Stijn
a315437e1c client: rename transportFunc -> testRoundTripper
Rename it so that it's clearer that it's intended for test-purposes,
and adding a `skipConfigureTransport()` method to the signature to
prevent IDEs considering is a redundant convert, and to be more explicit
on intent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-23 13:01:33 +02:00
Sebastiaan van Stijn
8dc5d1e64d api/types: move Ping and swarm.Status to client
The API does not produce these as a response; the fields in the Ping
struct, including the Swarm status are propagated from headers returned
by the /_ping endpoint.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 11:05:08 +02:00
Sebastiaan van Stijn
96b29f5a1f client: remove support for negotiating API version < v1.44 (docker 25.0)
Docker versions below 25.0 have reached EOL; 25.0 is currently maintained
as an LTS version by Mirantis, and we want to allow current versions of the
CLI to be able to connect to such setups.

This patch raises the fallback API version to API v1.44; when negotiating an API
version with a daemon, this will be the lowest version negotiated.

Currently, it still allows manually overriding the version to versions that
are not supported (`WithVersion`, `WithVersionFromEnv`), and no code has
been removed yet that adjusts the client for old API versions, but this
can be done in a follow-up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-08 13:57:28 +02:00
Sebastiaan van Stijn
9169ed2873 client: touch-up some godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-08 13:44:39 +02:00
Sebastiaan van Stijn
f5847040cc client: Client.negotiateAPIVersionPing: trim v-prefix before handling
Trim any v-prefix passed to this function to make sure we detect empty
API versions.

In most cases, the ping-response will originate from the API server, but
the exported `Client.NegotiateAPIVersionPing` allows a ping-response to
be passed manually.

While updating, also update the signature to only accept the version, as
only the `PingResponse.APIVersion` is used by this function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-22 11:31:16 +02:00
Sebastiaan van Stijn
d9cdfd2887 client: remove unused Client.HTTPClient() method
This method was introduced in [moby@5a84124] related to the (now removed)
support for "compose on kubernetes" in the CLI. This functionality extended
the CLI with endpoints that are not part of the engine API, but re-using
the HTTP-client with the same (TLS) config as the CLI itself.

While such scenarios may be something to consider in future (i.e. more easily
extend the API with custom endpoints), this method is not currently used,
but defined as part of the CLI's interface. This patch removes the method
for now, so that we can design from a clean slate in case we need this
extensibility, instead of keeping methods that were added ad-hoc around.

[moby@5a84124]: 5a84124739

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-19 17:07:39 +02:00
Sebastiaan van Stijn
4d20b6fe56 api/types/container: move container options to client
Move the option-types to the client and in some cases create a
copy for the backend. These types are used to construct query-
args, and not marshaled to JSON, and can be replaced with functional
options in the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 20:09:55 +02:00
Sebastiaan van Stijn
e46a991dc5 api: remove unused DefaultVersion, MinSupportedAPIVersion consts
These consts are no longer used, and separate consts were added in both
the client and daemon packages;

- client: 41da5700a4
- daemon: a632b8495b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 07:30:35 -05:00
Austin Vazquez
ca97d071b7 fix: client vendor with config struct changes
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-03 10:32:58 -05:00
Paweł Gronowski
20b679b4a6 client: Extract clientConfig for opt applying
Change functional options for the client so that they operate on an
intermediate struct instead of the public `Client` instance directly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-29 15:17:31 +02:00
Sebastiaan van Stijn
bfce6556c4 client: use stdlib errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-05 09:11:21 +02:00
Derek McGowan
c47afd41c8 Create github.com/moby/moby/client module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:26 -07:00
Derek McGowan
afd6487b2e Create github.com/moby/moby/api module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:05 -07:00
Sebastiaan van Stijn
41da5700a4 client: define default (and maximum) API version
With the client and API migrating to separate modules, users of the Client
module may upgrade the API module to higher versions. Currently, the Client
uses the API's Default version. While the version of the API module is
allowed to be updated (following SemVer), we should not allow the Client
to support higher API versions than it was written for.

This patch introduces a DefaultAPIVersion in the client package that is
used as default version of the API for the client to use.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-17 11:20:17 +02:00
Sebastiaan van Stijn
accbfde61e client: use go-winio.DialPipe directly
The go-connections package implementation is only a shallow wrapper
around go-winio for named pipes; use the go-winio implementation
directly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-06-02 14:38:47 +02:00
Sebastiaan van Stijn
4856e8ffad client: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:10 +02:00
Nathan Baulch
1784026740 client: custom trace options
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2025-02-08 18:04:18 +11:00
Sebastiaan van Stijn
2997c0ddc0 client: deprecate CommonAPIClient interface
The CommonAPIClient was used to define all the stable interfaces,
and combined with the experimental ones through APIClient. In theory,
this would allow someone to make sure they only depended on non-experimental
methods or to implement an alternative client that only implements the
stable methods.

While there are users currently using this interface, all those uses
depend on the actual client implementation, not a custom one, so they
should be able to switch to use APIClient instead. In the meantime,
start with deprecating, but keeping the interface the same for now,
scheduling it to become an alias, and removed in a future release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-04 17:21:31 +01:00
Sebastiaan van Stijn
b0e206b807 client: separate Dialer() implementation from public API
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-02-04 16:39:44 +01:00
Sebastiaan van Stijn
97b50bca2c client: WithVersion: strip v-prefix when setting API version
When overriding the API version through DOCKER_API_VERSION, no validation
happens on the given version. However, some code-paths in the client do
some minor normalizing, and strip the "v" prefix (if present) as part of
[`Client.getAPIPath()`][1].

This resulted in some inconsistent handling of the version that's set. For
example,  [`Client.checkResponseErr()`][2] decides whether or not the API
response is expected to support errors in JSON format (`types.ErrorResponse`),
which would fail because `versions.GreaterThan()` does not strip the prefix,
therefore making the first element "zero" (ranking lower than any valid version).

Net result was "mixed" because of this; for example in the following, half
the output is handled correctly ("downgraded from 1.47"), but the response
is handled as < 1.23 (so printed as-is);

    DOCKER_API_VERSION=v1.23 docker version
    Client: Docker Engine - Community
     Version:           27.5.1
     API version:       v1.23 (downgraded from 1.47)
     Go version:        go1.22.11
     Git commit:        9f9e405
     Built:             Wed Jan 22 13:41:13 2025
     OS/Arch:           linux/amd64
     Context:           default
    Error response from daemon: {"message":"client version 1.23 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version"}

Passing the version without v-prefix corrects this problem;

    DOCKER_API_VERSION=1.23 docker version
    Client: Docker Engine - Community
     Version:           27.5.1
     API version:       1.99 (downgraded from 1.47)
     Go version:        go1.22.11
     Git commit:        9f9e405
     Built:             Wed Jan 22 13:41:13 2025
     OS/Arch:           linux/amd64
     Context:           default
    Error response from daemon: client version 1.99 is too new. Maximum supported API version is 1.47

    DOCKER_API_VERSION=v1.99 docker version
    Client: Docker Engine - Community
     Version:           27.5.1
     API version:       v1.99 (downgraded from 1.47)
     Go version:        go1.22.11
     Git commit:        9f9e405
     Built:             Wed Jan 22 13:41:13 2025
     OS/Arch:           linux/amd64
     Context:           default
    Error response from daemon: {"message":"client version 1.99 is too new. Maximum supported API version is 1.47"}

This patch strips the prefix when setting a custom version, so that
normalization happens consistently. The existing code to strip the
prefix in [`Client.getAPIPath()`][1] is kept for now, in case values
are set through other ways.

[1]: 47dc8d5dd8/client/client.go (L303-L309)
[2]: 47dc8d5dd8/client/request.go (L231-L241)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-28 21:32:23 +01:00
Sebastiaan van Stijn
1240301299 Merge pull request #48736 from laurazard/client-set-conn-timeout
client: prevent idle connections leaking FDs
2024-10-25 17:28:14 +02:00
Laura Brehm
5c72a95a30 client: prevent idle connections leaking FDs
Patch from af6ada910f

Without this change, if a long-lived process uses the client and creates
connections, these connections are not released and grow over time.

We can also look into addressing this issue from the server side, but it
doesn't hurt for the `client` package to have good defaults and not
cause this.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-10-23 16:14:10 +01:00
Sebastiaan van Stijn
5b149d3faa client: update link to API documentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-12 17:23:09 +02:00
Gabriel Tomitsuka
88e5e4cfb4 Prevent data race during version negotiation
Signed-off-by: Gabriel Tomitsuka <gabriel@tomitsuka.com>
2024-06-13 19:37:11 +00:00
Sebastiaan van Stijn
6aea26b431 client: fix connection-errors being shadowed by API version mismatch errors
Commit e6907243af applied a fix for situations
where the client was configured with API-version negotiation, but did not yet
negotiate a version.

However, the checkVersion() function that was implemented copied the semantics
of cli.NegotiateAPIVersion, which ignored connection failures with the
assumption that connection errors would still surface further down.

However, when using the result of a failed negotiation for NewVersionError,
an API version mismatch error would be produced, masking the actual connection
error.

This patch changes the signature of checkVersion to return unexpected errors,
including failures to connect to the API.

Before this patch:

    docker -H unix:///no/such/socket.sock secret ls
    "secret list" requires API version 1.25, but the Docker daemon API version is 1.24

With this patch applied:

    docker -H unix:///no/such/socket.sock secret ls
    Cannot connect to the Docker daemon at unix:///no/such/socket.sock. Is the docker daemon running?

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-23 15:17:10 +01:00
Sebastiaan van Stijn
901b90593d client: NegotiateAPIVersion: do not ignore (connection) errors from Ping
NegotiateAPIVersion was ignoring errors returned by Ping. The intent here
was to handle API responses from a daemon that may be in an unhealthy state,
however this case is already handled by Ping itself.

Ping only returns an error when either failing to connect to the API (daemon
not running or permissions errors), or when failing to parse the API response.

Neither of those should be ignored in this code, or considered a successful
"ping", so update the code to return

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-23 14:31:55 +01:00
Sebastiaan van Stijn
08e4e88482 daemon: raise default minimum API version to v1.24
The daemon currently provides support for API versions all the way back
to v1.12, which is the version of the API that shipped with docker 1.0. On
Windows, the minimum supported version is v1.24.

Such old versions of the client are rare, and supporting older API versions
has accumulated significant amounts of code to remain backward-compatible
(which is largely untested, and a "best-effort" at most).

This patch updates the minimum API version to v1.24, which is the fallback
API version used when API-version negotiation fails. The intent is to start
deprecating older API versions, but no code is removed yet as part of this
patch, and a DOCKER_MIN_API_VERSION environment variable is added, which
allows overriding the minimum version (to allow restoring the behavior from
before this patch).

With this patch the daemon defaults to API v1.24 as minimum:

    docker version
    Client:
     Version:           24.0.2
     API version:       1.43
     Go version:        go1.20.4
     Git commit:        cb74dfc
     Built:             Thu May 25 21:50:49 2023
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.44 (minimum version 1.24)
      Go version:       go1.21.3
      Git commit:       0322a29b9ef8806aaa4b45dc9d9a2ebcf0244bf4
      Built:            Mon Dec  4 15:22:17 2023
      OS/Arch:          linux/arm64
      Experimental:     false
     containerd:
      Version:          v1.7.9
      GitCommit:        4f03e100cb967922bec7459a78d16ccbac9bb81d
     runc:
      Version:          1.1.10
      GitCommit:        v1.1.10-0-g18a0cb0
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0

Trying to use an older version of the API produces an error:

    DOCKER_API_VERSION=1.23 docker version
    Client:
     Version:           24.0.2
     API version:       1.23 (downgraded from 1.43)
     Go version:        go1.20.4
     Git commit:        cb74dfc
     Built:             Thu May 25 21:50:49 2023
     OS/Arch:           linux/arm64
     Context:           default
    Error response from daemon: client version 1.23 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version

To restore the previous minimum, users can start the daemon with the
DOCKER_MIN_API_VERSION environment variable set:

    DOCKER_MIN_API_VERSION=1.12 dockerd

API 1.12 is the oldest supported API version on Linux;

    docker version
    Client:
     Version:           24.0.2
     API version:       1.43
     Go version:        go1.20.4
     Git commit:        cb74dfc
     Built:             Thu May 25 21:50:49 2023
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.44 (minimum version 1.12)
      Go version:       go1.21.3
      Git commit:       0322a29b9ef8806aaa4b45dc9d9a2ebcf0244bf4
      Built:            Mon Dec  4 15:22:17 2023
      OS/Arch:          linux/arm64
      Experimental:     false
     containerd:
      Version:          v1.7.9
      GitCommit:        4f03e100cb967922bec7459a78d16ccbac9bb81d
     runc:
      Version:          1.1.10
      GitCommit:        v1.1.10-0-g18a0cb0
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0

When using the `DOCKER_MIN_API_VERSION` with a version of the API that
is not supported, an error is produced when starting the daemon;

    DOCKER_MIN_API_VERSION=1.11 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.12: 1.11

    DOCKER_MIN_API_VERSION=1.45 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: maximum supported API version is 1.44: 1.45

Specifying a malformed API version also produces the same error;

    DOCKER_MIN_API_VERSION=hello dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.12: hello

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:11:02 +01:00
Sebastiaan van Stijn
9670d9364d api/types: move ContainerListOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:24 +02:00
Sebastiaan van Stijn
e6907243af client: negotiate api version before handling version-specific code
We try to perform API-version negotiation as lazy as possible (and only execute
when we are about to make an API request). However, some code requires API-version
dependent handling (to set options, or remove options based on the version of the
API we're using).

Currently this code depended on the caller code to perform API negotiation (or
to configure the API version) first, which may not happen, and because of that
we may be missing options (or set options that are not supported on older API
versions).

This patch:

- splits the code that triggered API-version negotiation to a separate
  Client.checkVersion() function.
- updates NewVersionError to accept a context
- updates NewVersionError to perform API-version negotiation (if enabled)
- updates various Client functions to manually trigger API-version negotiation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 15:23:27 +02:00
Brian Goff
642e9917ff Add otel support
This uses otel standard environment variables to configure tracing in
the daemon.
It also adds support for propagating trace contexts in the client and
reading those from the API server.

See
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
for details on otel environment variables.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-09-07 18:38:19 +00:00
Sebastiaan van Stijn
fced566714 client: move resolveTLSConfig to a Client.tlsConfig()
This makes it slightly clearer what it does, as "resolve" may give the
impression it's doing more than just returning the TLS config configured
for the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-01 16:20:22 +02:00
Sebastiaan van Stijn
47af265234 client: Dialer: inline fallbackDial
fallbackDial was only used in a single place, and it was defined far away
from where it's used, so let's inline it, so that it's clear at a glance
what we're doing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-01 16:20:18 +02:00
Sebastiaan van Stijn
8d514f4e2e client: touch-up docs, and user doc-links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 18:31:51 +02:00
Sebastiaan van Stijn
92975f0c11 client: define a "dummy" hostname to use for local connections
For local communications (npipe://, unix://), the hostname is not used,
but we need valid and meaningful hostname.

The current code used the client's `addr` as hostname in some cases, which
could contain the path for the unix-socket (`/var/run/docker.sock`), which
gets rejected by go1.20.6 and go1.19.11 because of a security fix for
[CVE-2023-29406 ][1], which was implemented in  https://go.dev/issue/60374.

Prior versions go Go would clean the host header, and strip slashes in the
process, but go1.20.6 and go1.19.11 no longer do, and reject the host
header.

This patch introduces a `DummyHost` const, and uses this dummy host for
cases where we don't need an actual hostname.

Before this patch (using go1.20.6):

    make GO_VERSION=1.20.6 TEST_FILTER=TestAttach test-integration
    === RUN   TestAttachWithTTY
        attach_test.go:46: assertion failed: error is not nil: http: invalid Host header
    --- FAIL: TestAttachWithTTY (0.11s)
    === RUN   TestAttachWithoutTTy
        attach_test.go:46: assertion failed: error is not nil: http: invalid Host header
    --- FAIL: TestAttachWithoutTTy (0.02s)
    FAIL

With this patch applied:

    make GO_VERSION=1.20.6 TEST_FILTER=TestAttach test-integration
    INFO: Testing against a local daemon
    === RUN   TestAttachWithTTY
    --- PASS: TestAttachWithTTY (0.12s)
    === RUN   TestAttachWithoutTTy
    --- PASS: TestAttachWithoutTTy (0.02s)
    PASS

[1]: https://github.com/advisories/GHSA-f8f7-69v5-w4vx

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-14 18:57:53 +02:00
Sebastiaan van Stijn
a6048fc792 client: add WithUserAgent() option
When constructing the client, and setting the User-Agent, care must be
taken to apply the header in the right location, as custom headers can
be set in the CLI configuration, and merging these custom headers should
not override the User-Agent header.

This patch adds a dedicated `WithUserAgent()` option, which stores the
user-agent separate from other headers, centralizing the merging of
other headers, so that other parts of the (CLI) code don't have to be
concerned with merging them in the right order.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-09 09:59:29 +02:00
Tianon Gravi
751888979c Merge pull request #44382 from thaJeztah/client_rewrite
client: defaultHTTPClient() accept URL
2023-04-27 23:27:59 +00:00
Cory Snider
6b9968e8b1 client: deprecate NewClient properly
The 'Deprecated:' line in NewClient's doc comment was not in a new
paragraph, so GoDoc, linters, and IDEs were unaware that it was
deprecated. The package documentation also continued to reference
NewClient. Update the doc comments to finish documenting that NewClient
is deprecated.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-03-31 16:15:01 -04:00