mirror of
https://github.com/docker/compose.git
synced 2025-07-27 23:54:04 +02:00
Invert the logic to preserve the happy path
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
4f3c2c1996
commit
933bed5f5d
@ -57,13 +57,15 @@ func New(ctx context.Context) (*Client, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if ba, ok := b.(containers.ContainerService); ok {
|
ba, ok := b.(containers.ContainerService)
|
||||||
return &Client{
|
if !ok {
|
||||||
backendType: contextType,
|
return nil, errors.New("backend not found")
|
||||||
cc: ba,
|
|
||||||
}, nil
|
|
||||||
}
|
}
|
||||||
return nil, errors.New("backend not found")
|
return &Client{
|
||||||
|
backendType: contextType,
|
||||||
|
cc: ba,
|
||||||
|
}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user