mirror of https://github.com/docker/compose.git
Remove useless SetContext function in client.go
This commit is contained in:
parent
6ecb5550f7
commit
c4a260369b
|
@ -69,21 +69,6 @@ type Client struct {
|
||||||
cc containers.ContainerService
|
cc containers.ContainerService
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) SetContext(ctx context.Context, contextType string) error {
|
|
||||||
b, err := backend.Get(ctx, contextType)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
ba, ok := b.(containers.ContainerService)
|
|
||||||
if !ok {
|
|
||||||
return errors.New("unknown context type")
|
|
||||||
}
|
|
||||||
|
|
||||||
c.cc = ba
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) ContainerService() containers.ContainerService {
|
func (c *Client) ContainerService() containers.ContainerService {
|
||||||
return c.cc
|
return c.cc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue