mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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:
@@ -85,7 +85,7 @@ func (d *Daemon) inspectFieldWithError(name, field string) (string, error) {
|
||||
func (d *Daemon) CheckActiveContainerCount(ctx context.Context) func(t *testing.T) (any, string) {
|
||||
return func(t *testing.T) (any, string) {
|
||||
t.Helper()
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv, client.WithHost(d.Sock()))
|
||||
apiClient, err := client.New(client.FromEnv, client.WithHost(d.Sock()))
|
||||
assert.NilError(t, err)
|
||||
|
||||
list, err := apiClient.ContainerList(ctx, client.ContainerListOptions{})
|
||||
|
||||
Reference in New Issue
Block a user