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>
This commit is contained in:
Sebastiaan van Stijn
2025-10-29 17:20:49 +01:00
parent a96bc9e93c
commit d1f70d4f54
129 changed files with 411 additions and 391 deletions

View File

@@ -177,7 +177,7 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
expectTimeout(wc, br, "stdout")
// Test the client API
apiClient, err := client.NewClientWithOpts(client.FromEnv)
apiClient, err := client.New(client.FromEnv)
assert.NilError(c, err)
defer apiClient.Close()